Skip to content

Instantly share code, notes, and snippets.

@Constellation
Created December 7, 2008 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Constellation/33180 to your computer and use it in GitHub Desktop.
Save Constellation/33180 to your computer and use it in GitHub Desktop.
// ==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