Skip to content

Instantly share code, notes, and snippets.

@tetsutan
Created October 4, 2011 07:57
Show Gist options
  • Save tetsutan/1261105 to your computer and use it in GitHub Desktop.
Save tetsutan/1261105 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Auto Full Feed
// @include http://reader.livedoor.com/reader/*
// @include http://fastladder.com/reader/*
// @description auto loading full feed required LDR Full Feed
// @version 0.0.5
// ==/UserScript==
(function(w){
var auto_full_feed_items = [
// /b.hatena.ne.jp/
/av.watch.impress.co.jp/,
/pc.watch.impress.co.jp/,
/www.gizmodo.jp/,
/japan.cnet.com/,
/ameblo.jp/,
/netatama.net/,
];
var match_link = function(link){
for(var i in auto_full_feed_items){
if(link.search(auto_full_feed_items[i]) != -1){
return true;
}
}
return false;
};
setTimeout(function(){
if(!w.LDR){
setTimeout(arguments.callee,100);
return;
}
var id = undefined;
w.LDR.register_hook('AFTER_PRINTFEED',function(feed){
if(id){
clearInterval(id);
id = undefined;
}
var link = feed.channel.link
if(!match_link(link)) return;
id = setTimeout(function(){
if(!w.writing_complete()){
id = setTimeout(arguments.callee,100);
}
else{
w.Keybind.sendKey("u");
}
},100);
});
},100)
})(this.unsafeWindow || this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment