Google x はてブ のコメントをツールチップ表示

Greasemonkeyでprototype.jsやscript.aculo.usを使う方法 - Accept Thingsを参考にスクリプト同士を連携させてみた。
unsafeWindow経由でfunction自体もやり取りできるようなので、もっと色々できそう。

hbcomment.user.js
gb.user.jsに以下の2行を追加する必要あり。


12行目あたり

a.setAttribute("href", "http://b.hatena.ne.jp/entry/"+link.href);
a.appendChild(document.createTextNode(""+count+" user"+(count>1?"s":"")));
a.className = "hbusers";  // 追加


39行目あたり

while (m = pattern.exec(response.responseText)) {
  var link = url2link[m[1]];
  if (link && m[2] > 0) setBookmarkCount(link, m[2]);
}
unsafeWindow.hbCountLoad = true;  // 追加


  • 2006-03-20 表示されなくなっていたので修正