English Forum Switzerland

English Forum Switzerland (https://www.englishforum.ch/forum.php)
-   Forum support (https://www.englishforum.ch/forum-support/)
-   -   FF: greasemonkey script to set max img width (https://www.englishforum.ch/forum-support/299812-ff-greasemonkey-script-set-max-img-width.html)

hairybadger 25.08.2020 12:09

FF: greasemonkey script to set max img width
Firefox only:

Something that has been bugging me forever is the width of images in englishforum: if a wide image is posted, I have to sideways-scroll to read the text in all the messages. Example:


Yes, Firefox is always up-to-date. I've cobbled together an ugly-as-F greasemonkey script.

// ==UserScript==
// @name englishforum set max img width
// @version 1
// @grant none
// @namespace my.englishforum
// @include https://www.englishforum.ch/*html
// ==/UserScript==
var imgs = document.getElementsByTagName("img");

var length = imgs.length;

for(ii=0;ii< length;ii++){

function setImgWidth(img ) {
img.style.maxWidth = "900px";

Obviously there are other ways of doing it; this works for me.

All times are GMT +2. The time now is 22:47.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0