Created
January 6, 2012 23:09
-
-
Save sendos/1572878 to your computer and use it in GitHub Desktop.
Bookmarklet to show images inline
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
javascript:document.documentElement.innerHTML=document.documentElement.innerHTML.replace(/<a%20([^>]*)href=\"(http:\/\/[^\"]+)\.(jpg|JPG|png|PNG|gif|GIF)\"([^>]*)>([^<]+)<\/a>/g,%20"<a%20$1%20href=\"$2.$3\"$4>$5</a><img%20src=\"$2.$3\"%20style=\"border-style:solid;border-width:3px;\"%20width=\"600px\">");%20%20%20%20%20%20%20%20document.documentElement.innerHTML=document.documentElement.innerHTML.replace(/<a%20([^>]*)href=\"http:\/\/imgur.com\/([^\"\/\.]+)\"([^>]*)>([^<]+)<\/a>/g,%20"<a%20$1%20href=\"http://imgur.com/$2\"$3>$4</a><img%20src=\"http://i.imgur.com/$2.jpg\"%20style=\"border-style:solid;border-width:3px;\"%20width=\"600px\">").replace(/<a%20([^>]*)href=\"(http:\/\/www.quickmeme.com\/meme\/)([^\"\/]+)\/?\"([^>]*)>([^<]+)<\/a>/g,%20"<img%20src=\"http://i.qkme.me/$3.jpg\"%20style=\"border-style:solid;border-width:3px;\"%20width=\"300px\"><a%20$1%20href=\"$2$3\"$4>$5</a>").replace(/<a%20([^>]*)href=\"(http:\/\/qkme.me\/)([^\"\/\?]+)[^\"]*\"([^>]*)>([^<]+)<\/a>/g,%20"<img%20src=\"http://i.qkme.me/$3.jpg\"%20style=\"border-style:solid;border-width:3px;\"%20width=\"300px\"><a%20$1%20href=\"$2$3\"$4>$5</a>");%20void%200; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment