Created
December 7, 2008 16:43
-
-
Save Constellation/33180 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 LDR filters | |
// @namespace http://d.hatena.ne.jp/Constellation/ | |
// @description replace image URL, and so on. | |
// @include http://fastladder.com/reader/ | |
// @include http://reader.livedoor.com/reader/ | |
// ==/UserScript== | |
(function(win){ | |
var image_check = /(?:\.jpg|\.png|\.bmp)$/ | |
win.register_hook('BEFORE_PRINTFEED', function(feed){ | |
feed.items.forEach(function(item){ | |
if(image_check.test(item.link)){ | |
item.body = '<img src="'+item.link+'" />'; | |
} | |
}); | |
}); | |
})(this.unsafeWindow || this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment