var pnir;
var document;
var id;
pnir = new ActiveXObject("Sleipnir.API");
id = pnir.GetDocumentID(pnir.ActiveIndex);
document = pnir.GetDocumentObject(id);
window = pnir.GetWindowObject(id);
if (document == null) {
pnir.MessageBox("Document オブジェクトを作成できません");
}
else {
// TODO: コードをここに記述してください。
d=document;
id = pnir.NewWindow("about:Pukiwiki_link_maker",true);
document = pnir.GetDocumentObject(id);
document.body.innerHTML = "<form><textarea cols='60' rows='8'>"
+ '[[' + d.title.replace(']]',']]') + ':'+ d.URL + ']]'+ "\n"
+ d.selection.createRange().text
+ "</textarea></form>";
document = null;
}
pnir = null;
使い方は前のスクリプトと一緒なのでインストール方法などはそちらを参照してもらうこととして、実行するとクリップボードを操作せずSleipnirに新しいタブを表示して、そこにPukiWikiでのリンク用の文字列を表示します。まぁ、使いたい方はお好きな方でどうぞ( ̄▽ ̄)ノ
Posted by Takuchan at 2004年12月04日 17:04
| トラックバック(0)