Skip to content

Instantly share code, notes, and snippets.

@zaknak
Created September 21, 2008 14:15
Show Gist options
  • Save zaknak/11874 to your computer and use it in GitHub Desktop.
Save zaknak/11874 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name LDR modify Favotter
// @namespace http://d.hatena.ne.jp/zaknak/
// @include http://reader.livedoor.com/reader/
// ==/UserScript==
var w = (typeof unsafeWindow == 'undefined') ? window : unsafeWindow;
var c = 0;
(function(){
if(typeof w.register_hook != 'undefined'){
w.register_hook("before_printfeed",function(feed){
if(/^http:\/\/favotter\.matope\.com/.test(feed.channel.link)){
feed.items.forEach(function(item){
if(/id=(\d+)$/.test(item.link))
item.link = ['http://twitter.com/',item.author,'/statuses/',RegExp.$1].join('');
});
}
});
}else if(c < 5){
setTimeout(arguments.callee,1000);
c++;
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment