Author Topic: [USERSCRIPT] Anti-pagestretch  (Read 2283 times)

so last night when the forum Self Delete happened i saw the huge images that anonymous posted and i thought "boy we really need something that prevents pagestretching holy stuff"
so i made this and it works well so i decided to give it to you all
have a download link

http://www.garycact.us/downloads/pagestretch.txt
just copy/paste that into some new userscript cause i am unable to figure out how to get a direct link to add a script into your browser thingymajob

examples:
turns this

into this

(direct link if you want to test it for yourself after installing the script)

if you encounter any bugs or think i could improve it in some way please say

its a userscript, so you'll need some form of tampermonkey, greasemonkey, violentmonkey, or monkey face (ouo)



it already exists but nice

This can be done more efficiently as a Stylish style
Just throw a max-width into a .post img

I mean your script already works by adding CSS to the elements, why not do it purely through CSS?

Code: [Select]
@-moz-document domain("forum.blockland.us") {
   .post img
   {
     max-width:1000px;  
   }
}
« Last Edit: November 15, 2015, 12:27:09 PM by Headcrab Zombie »

it already exists but nice
wait it does
amazing i never knew this

Wait there was a forum Self Delete last night? Also I there are User Stylish themes for the website that do it automatically too. Not sure which ones, but I know the BL Light 2 theme does it.

Define "huge" because I posted a 1280x image and I was told I stretched the page. Anyone with a 1920x monitor would be unaffected.

This can be done more efficiently as a Stylish style
Just throw a max-width into a .post img

I mean your script already works by adding CSS to the elements, why not do it purely through CSS?

Code: [Select]
@-moz-document domain("forum.blockland.us") {
   .post img
   {
     max-width:1000px;   
   }
}
never knew that this was possible through stylish but its too late for that for at least this userscript

Define "huge" because I posted a 1280x image and I was told I stretched the page. Anyone with a 1920x monitor would be unaffected.
it auto-calculates what image width might be stretching the page. if you have a 4k monitor and someone posted an image with 4k width, it wouldn't resize the image for you. if you had a smaller monitor, it would resize it.
« Last Edit: November 15, 2015, 12:33:14 PM by Gytyyhgfffff »

I didn't even know they were that big because I've been using a userstyle that did this for like a year

It would help if your script didn't break other sites.



Change the first * to http://. https:// doesn't matter because the forum doesn't even work with it.
« Last Edit: November 15, 2015, 02:38:09 PM by dargereldren »

[ig]http://i.imgur.com/tswaaU0.png[/img]

Change the first * to http://. https:// doesn't matter because the forum doesn't even work with it.
fixed

It would help if your script didn't break other sites.
and how in the world is it doing this? it should only effect the forums.

Works great for me, thanks for posting this.