Oh, awesome! Except, I don’t know how to install it? How does that work? I do have greasemonkey and use the other SDMB script, just not sure how to install code like that.
Renee, are you using Firefox? This is how I did it; I have no idea if there’s supposed to be an easier way. I hope so.
Go into Tools/Greasemonkey/New User Script and then fill in the Name, Namespace, Description, and *Includes *fields with exactly what is in the code box in Polerius’ OP for those fields.
Click OK, it will ask you to locate your fave text editor (notepad for you?) and you locate it. It opens up a page for you. Then, from the code box in the OP again, copy everything from (function() to the end of the code box and paste it in the bottom of your new page. Save, and viola!.
Is there a way to automaticaly downscale images? I usually browse zoomed in since I’m sitting in a recliner a good two metres away from the monitor and all those pictures in the cat thread end up being scrollbar-inducingly huge. Is there a way to, say, fix them to a proportion of the screen or automatically downsize images to like 800x600?
The problem is making sure you don’t also upscale images that are smaller than that. But Poleris has out JavaScripted me before, so I wouldn’t be surprised if he thought of something.
A quick and dirty way to it is to replace the string
<img src=\"$1.$2\">"
in the code in the OP to something like
<img src=\"$1.$2\" height=\"600px\">"
which makes all images be 600 pixels tall. To do anything more intelligent (to make sure you don’t unnecessarily blow up images that are already small) would be more involved.
Am I a dork for being excited about trying this when I get home? Polerius, wasn’t it you who made the Greasemonkey script to help identify zombies? That one has been rocking my face pretty hard. If it wasn’t you, thanks still for this one, and thanks again to the person who created it!
In case you have a browser that doesn’t support Greasemonkey scripts, or you have an iPhone/iPad, you can get the same effect by adding the following bookmarklet to your browser
javascript:var allPosts=document.getElementsByClassName('alt1');for (var i = 0; i < allPosts.length; i++){allPosts*.innerHTML = allPosts*.innerHTML.replace(/<a href=\"(http:\/\/[^\"]+)\.(jpg|JPG|png|PNG|gif|GIF)\" target=\"_blank\">([^<]+)<\/a>/g, "<a href=\"$1.$2\" target=\"_blank\">$3</a><img src=\"$1.$2\">");}; void 0;
To add it: Just visit any website with your browser and bookmark it. Then, edit the bookmark and rename it to something like “See images” and edit the ‘location’ or ‘URL’ property of the bookmark and paste the code from above.
To use it: Visit any SDMB thread with images (likethis one) and when it finishes loading, simply click the bookmark you made above. Voila! You should now see images embedded in the thread.
I just tried this on my iPhone, and the result is very cool. No need to click on all the individual images to see what they are and then come back to the thread.