I've found a fix for browser-wide-on images
Posted: 22 Jun 2008, 12:22
The Sisters of Mercy Forum
https://myheartland.co.uk/
markfiend wrote:This one works on any and all websites, including ones we don't have moderating privileges on...
Have you got the greasemonkey extension for firefox? It's a script for that.Obviousman wrote:Looks cool, so I just downloaded this, now how can I get it to work?
Code: Select all
// Written by Yan Huang
// ==UserScript==
// @name Yan's Code...Pwnage!
// @description Pwnage!
// @include http://*
// ==/UserScript==
var z = document.getElementsByTagName ('img');
for (i = 0; i < z.length; i++)
{
if (z[i].width >= screen.width * 0.60)
{
var aspect = (z[i].width / z[i].height);
z[i].width = screen.width * 0.60;
z[i].height = z[i].width / aspect;
}
}
Got it, should've installed that first. Doh...markfiend wrote:Have you got the greasemonkey extension for firefox? It's a script for that.Obviousman wrote:Looks cool, so I just downloaded this, now how can I get it to work?
It should just work.
Code: Select all
// Written by Yan Huang
// ==UserScript==
// @name Yan's Code...Pwnage!
// @description Pwnage!
// @include http://*
// ==/UserScript==
var z = document.getElementsByTagName('img');
for(i=0;i<z.length;i++) {
if(z[i].width >= screen.width*0.6) {
z[i].width = screen.width*0.6;
}
}
markfiend wrote:Edit to add: mh WTF have you done with the code format man? Opening braces on their own line? What's that all about?
That's just evil though. I had it formatted by the one true code formatmh wrote:markfiend wrote:Edit to add: mh WTF have you done with the code format man? Opening braces on their own line? What's that all about?
markfiend wrote:That's just evil though. I had it formatted by the one true code formatmh wrote:markfiend wrote:Edit to add: mh WTF have you done with the code format man? Opening braces on their own line? What's that all about?
Code: Select all
// ==UserScript==
// @name shrinkylinks
// @namespace http://www.markfiend.com/scripts
// @description For blogs and messageboards: if the link text is the same as the link destination, changes the link text to 'Clicky'
// @include *
// ==/UserScript==
var z = document.getElementsByTagName('a');
for(i=0;i<z.length;i++) {
if(z[i].href == z[i].innerHTML && z[i].href != '') {
z[i].innerHTML = 'Clicky';
}
}
Code: Select all
// This script is provided under the terms of the GNU General
// Public License, version 3, which can be found at
// http://www.gnu.org/copyleft/gpl.html
// Specifically, note that this script comes with NO guarantees,
// not even the implied guarantee of merchantibility or fitness for a
// specific purpose.