tDiary用Bookmarklet

がほしかったので、いろいろ調べる。
URL設定までは出来るらしいけど、本文に選択文字列を送るとかが
めんどくさそうだったので、クリップボードに逃げる。
最終的に、
//tDiaryBookmarklet var pnir; var document; var id; pnir = new ActiveXObject("Sleipnir.API"); id = pnir.GetDocumentID(pnir.ActiveIndex); document = pnir.GetDocumentObject(id); if (document == null) { pnir.MessageBox("Document オブジェクトを作成できません"); } else { var str = document.body.innerHTML; str.match(/trackback:ping=[\'\"](http.+)[\'\"]/i); var pingUrl = RegExp.$1; pnir.NewWindow('http://www.echo-sp.com/update.rb?plugin_tb_url='+escape(pingUrl),false); window = pnir.GetWindowObject(id); line = document.selection.createRange().text  title = document.title; window.clipboardData.setData('text',"<a href=\""+pnir.url+"">" + title + "\</a\>\n<pre>\n<blockquote>" + line + "</blockquote>\n</pre>") window = null; document = null; } pnir = null;
こんな感じ。   ここの情報ここの情報を参考に。 参考っていうか、流用・・・   ちょっとMTっぽくなった。   自動で挿入できるように本体を・・・とか思ったけど、 断念。