Jul 12, 2007
livedoor ReaderにはてなスターをくっつけるGreasemonkeyスクリプト
の、雛形。http://la.ma.la/misc/userjs/ldr_with_hatenaster.user.js
(function(){
var w = typeof unsafeWindow != "undefined" ? unsafeWindow : window;
var initialized = false;
var s = document.createElement('script');
s.src = 'http://s.hatena.ne.jp/js/HatenaStar.js';
s.charset = 'utf-8';
document.body.appendChild(s);
var t = setInterval(function(){
if(w.Hatena){
init();
initialized = true;
clearInterval(t);
}
}, 100);
function init(){
w.Hatena.Star.EntryLoader.headerTagAndClassName = ['h2', 'item_title'];
w.Keybind.add('H', function(){
new w.Hatena.Star.EntryLoader();
});
}
})();
Shift + Hを押すと現在見てる記事にスターを表示。JSON API直接叩いてもいいけど、仕様変更に対応しやすいように。
Edit this entry...
wikieditish message: Ready to edit this entry.
A quick preview will be rendered here when you click "Preview" button.