Author Topic: [Greasemonkey script] Anti-page-stretch - auto-shrink huge images! update  (Read 1528 times)

Code: [Select]
so this mod is really simple and i guess it's working now, at least in chrome so i'll release it

[code]// ==UserScript==
// @name Blockland Forums Auto-Shrink
// @namespace http://www.bluzone.no-ip.org/
// @description Makes images not be bigger than your browser.
// @include http://forum.blockland.us/index.php*
// ==/UserScript==

var imgs = document.getElementsByTagName('img');

var img;

for (var i = 0; i < imgs.length; i++) {
img = imgs[i];

img.style.maxWidth = '100%';
}

Quote from: kingdaro, who took it from mygamercard.net
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)

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]
« Last Edit: September 08, 2012, 11:08:50 PM by Lugnut »


All you need is a Stylish script for BLF that says.

Code: [Select]
img {max-width:100%; }

All you need is a Stylish script for BLF that says.

Code: [Select]
img {max-width:100%; }
^this guy

it's useful if you don't have or want to install stylish though.

however I think a max height of 480 is a little small :/

^this guy

it's useful if you don't have or want to install stylish though.

however I think a max height of 480 is a little small :/
then change it d:

All you need is a Stylish script for BLF that says.

Code: [Select]
img {max-width:100%; }

if only i knew what i was suppose to do with this
because a working anti-stretch script would be useful

^this guy

it's useful if you don't have or want to install stylish though.

however I think a max height of 480 is a little small :/
working on a netbook here loel

i was intending on making a thing on how to change that in the op but then stuff happened
All you need is a Stylish script for BLF that says.

Code: [Select]
img {max-width:100%; }
i think if i set the too-big images to width=100% they'll shrink to 100% of available space... i must experiment

or you could just go through all of the images and do img.style.maxWidth = '100%';

if only i knew what i was suppose to do with this
because a working anti-stretch script would be useful

Install Stylish for your browser, then go to the extension options. Click write a new style, and do this:



Those 3 URLs are:

http://forum.blockland.us/index.php?topic
http://forum.blockland.us/index.php?action=profile
http://forum.blockland.us/index.php?action=pm

Click save, and you're done.
« Last Edit: September 08, 2012, 01:56:15 PM by dkamm65 »


or you could just go through all of the images and do img.style.maxWidth = '100%';
........ just did this, it affected every bit. made the entire script easier, and more stable.

also, this thread died really fast :panda:

I would rather no one do this because then everyone will spam giant images and might not even realize there is a problem. You shouldn't be posting huge images in the first place, you should be able to notice when it happens and tell them.

I would rather no one do this because then everyone will spam giant images and might not even realize there is a problem. You shouldn't be posting huge images in the first place, you should be able to notice when it happens and tell them.

Don't tell us what not to use.



Very nice! :D

I would rather no one do this because then everyone will spam giant images and might not even realize there is a problem. You shouldn't be posting huge images in the first place, you should be able to notice when it happens and tell them.
in which case everyone has the script and nobody has any problems.

in which case everyone has the script and nobody has any problems.

Sticky this topic? :|