Created
October 4, 2011 07:57
-
-
Save tetsutan/1261105 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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