[code]
// ==UserScript==// @name Anti-Trans and auto-shrink// @description makes transparent stuff visible, and makes images not be bigger than your browser.// @version 1.2// @match http://forum.blockland.us/index.php*// ==/UserScript==var spans = document.getElementsByTagName('span');var sl = spans.length;for(var i = 0; i < sl; i++) { if(spans[i].style.color == "transparent") { spans[i].style.color = "red"; spans[i].innerHTML = "[transparent]" + spans[i].innerHTML + "[/transparent]"; }}var imgs = document.getElementsByTagName('img');var img;for (var i = 0; i < imgs.length; i++) { imgs[i].style.maxWidth = '100%'; }
Running Userscripts is easy, but you may require some setup to be able to install them:Google Chrome allows native runtime of Userscripts; just click and go! You can remove Userscripts via the 'Extensions' tab. - chrome removed this super-easy-install for security reasons or something. click the link and a little bar will pop up with info on how to install them (straight from google) I recommend tampermonkey extension.Mozilla Firefox requires the Greasemonkey plugin before using this script.Apple Safari's version 5 allows the installation of the NinjaKit extension (Click 'NinjaKit for Safari').Opera is also native, but requires some setup. See 'Adding User JavaScripts' for more details, then download the script to the directory you specify.Microsoft Internet Explorer is unfortunately left out of the party. With no native support for userscripts, and no development on addons for years (and only for earlier versions) means no automatic Leaderboards for now. :([/code]
This looks really useful. At least, the auto-shrinking part does. I dunno why I'd need the trans text one.
Instead of manually adding the width to every single image on the page, you could just add a style for all img elements so they are 100% width. Also, wouldn't 100% force images to fill an area as well as shrink huge images?
you would think so but for some dumb reason it doesn't
I was so wrapped up in the whole looping through each image and adding the style to them individually, I missed "max-width."
I don't like it when someone posts a disclaimer about a thread in invisible text and then I go and make a joke and then the disclaimer makes me look like an idiot/jerk.