delicious から twitter に

設定にあったんだね.
https://secure.delicious.com/settings/bookmarks/sharing
friendfeed や twitterfeed を間にかませるというめんどくさいことをやってた.
twitterfeed はアクセス数を測れるという利点はある.


本題.
delicios から twitter に投げると



のように,メッセージとurl のみが投稿される.これでは何がなんだかわからんので delicious でブックマークしたものであるとわかりやすくしてみた.

// ==UserScript==
// @include http://www.delicious.com/save*
// ==/UserScript==

// delicious から twitter にポストはメッセージと url(icio.us/foobar) しか投稿されない
// 自動でページのタイトルをメッセージに追加するように
// さらに notes に何か書くとそれもメッセージに追加するようにした

(function() {
	if(document.getElementById("send").value.indexOf("@twitter") >= 0) {
		var title = document.getElementById("title").value,
			prefix = "[d] ",
			note = document.getElementById("notes"),
			message = document.getElementById("messageField"),
			t = prefix + title;
			message.value = t;
		note.addEventListener("blur", function() {
			var v;
			message.setAttribute(
				"value",
				(v = this.value) != "" ?  
					v + " " + t:
					t
			);
		}, false);
	}
})();

ソース上のコメントにある通り, title と notes をメッセージに追加するようにしてある.
動くページが /save のみとなっているところをどうにかしたい.


動作確認: Opera 10.62