atode
超高速del.icio.usポスト用bookmarklet について.
最速インターフェース研究会 :: del.icio.usに特定のタグを付けて一発ブックマークするブックマークレットを作る奴
http://la.ma.la/misc/js/delicious_bookmarklet.html
作った。
肝心のブックマークレットが無いような気がしたので。
http://subtech.g.hatena.ne.jp/miyagawa/20060412/1144846549これ参考にした。
http://ejohn.org/blog/super-fast-delicious-bookmarklet/オリジナルは自動で閉じるポップアップウィンドウを使ってるんだけど、なんかimgタグでもできた。まあいいや。こんにちは。
imgタグのやつっていうのは本当にスーパーファーストなのだ.
del.icio.usに特定のタグを付けて一発ブックマークするブックマークレットを作る奴
"atode"というタグをつけて一発ブックマークするブックマークレットをつくった.
こんなん.
post atode
javascript:(function(){var%20u=%22taizooo%22;var%20q=location.href;var%20e%20=%20%22%22%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection?document.getSelection():document.selection.createRange().text);var%20p=document.title;var%20url=%22http://del.icio.us/%22+u+%22?jump=doclose&tags=%22+escape(%22atode%22)+%22&url=%22+escape(q)+%22&description=%22+escape(p)+%20%20%22&extended=%22%20+%20escape(e).replace(/%20/g,%20%22+%22);(new%20Image).src=url})();
でもね.これ safari だと日本語の題名が化け化けなのよ.Firefox だと、大丈夫なのにね.でもってきっとこの escape() っていうのがミソだとおもったからしらべた.
del.icio.us の純正ブックマークレットだとこういう風.
javascript:location.href='http://del.icio.us/post?v=4;url='+encodeURIComponent(location.href)+';title='+encodeURIComponent(document.title)
escape() じゃなくて encodeURIComponent() というのを使っています.これかな?
なにがかいてあるのかよくわかりません.
まあいいや、というわけで escape() を encodeURIComponent() に置換してみた.正しいかどうかわからんけども、化けなくなった.めでたしめでたし.
javascript:(function(){var%20u=%22taizooo%22;var%20q=location.href;var%20e%20=%20%22%22%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection?document.getSelection():document.selection.createRange().text);var%20p=document.title;var%20url=%22http://del.icio.us/%22+u+%22?jump=doclose&tags=%22+encodeURIComponent(%22atode%22)+%22&url=%22+encodeURIComponent(q)+%22&description=%22+encodeURIComponent(p)+%20%20%22&extended=%22%20+%20encodeURIComponent(e).replace(/%20/g,%20%22+%22);(new%20Image).src=url})();