tDiary用Bookmarklet for Sleipnir (v2)

ちょっと改造
//tDiaryBookmarklet var pnir; var document; var id; var res; pnir = new ActiveXObject("Sleipnir.API"); id = pnir.GetDocumentID(pnir.ActiveIndex); document = pnir.GetDocumentObject(id);   if (document == null) { pnir.MessageBox("Document オブジェクトを作成できません"); } else {   res = pnir.InputBox("タグを付けてください。",""); if(res == null){ res = "[Tips]"; } else{ res = "[" + res + "]"; }     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', res + "<a href=\""+pnir.url+"\">" + title + "</a>\n<pre>\n<blockquote>\n" + line + "\n</blockquote>\n</pre>") window = null; document = null; } pnir = null;
タグを付けるプロセスを入れてみた。