追記
IEDockExを使う例。ボタンクリックでアクティブなタブのfavicon用URLハッシュを表示する。それだけしかしないのであんまり役にたたない。
index.html(IEDockExに表示するhtmlファイル)
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script><!-- function init() { open("adapter.html"); } function showUrlHash() { var link = document.createElement("a"); link.href = sleipnir.API.URL; document.getElementById("view").innerText = sleipnir.API.GetUrlHash(link.hostname, 16); } --></script> </head> <body onload="init()" style="margin:0;"> <form> <input type="button" onclick="showUrlHash()"> <span id="view"></span> </form> </body> </html>
SeaHorseスクリプト
// ==UserScript== // @name AddISleipnirToIEDockEx // @include file*adapter.html // @description IEDockExへISleipnirを渡す // @type SleipnirScript // ==/UserScript== _window.opener.sleipnir = sleipnir; _window.close();
config.ini
Align=top Size=20 NewWindow=true
index.htmlの読み込み時にadapter.htmlを開くのでindex.htmlと同じ位置*1にadapter.htmlをおいておく。中身は空でOK。開かれたadapter.htmlでSeaHorseスクリプトを動かす。config.iniの想定はこんな感じだけれどさして重要ではない。NewWindowをfalseにするならopen()のとこでターゲット指定した方がいいって程度。
*1:plugins\IEDockEx\〜〜