Sorry, not working.
Now NO change take place.
Other suggestion?
On Friday, 8 May 2015 14:32:40 UTC+2, janekptacijarabaci wrote:
> Try to change the code:
>
> From:
>
> document.addEventListener("load", function () {}, true);
>
> To:
>
> window.addEventListener("load", function () {});
>
>
> // ==UserScript==
> // @name ModGHacks
> // @namespace nsModGHacks
> // @description Modify ghacks.net
> // @include http://www.ghacks.net/*
> // @version 1.0.0
> // @grant none
> // ==/UserScript==
>
> window.addEventListener("load",
>
> function () {
> var imgNodes = document.getElementsByTagName("img"),
> imgNode,
> i = imgNodes.length,
>
> imgWidth = 0,
> imgHeight = 0,
> newWidth = 0,
> newHeight = 0,
>
> minWidth = 200,
> newSize = 0.8;
>
> for (;i;) {
> imgNode = imgNodes[--i];
>
> imgWidth = imgNode.width;
> imgHeight = imgNode.height;
> if (imgWidth >= minWidth) {
> newWidth = Math.round(imgNode.width * newSize);
> newHeight = Math.round(imgNode.height * newSize);
> imgNode.style.width = newWidth + "px";
> imgNode.style.height = newHeight + "px";
> console.log("Image (href = \"" + imgNode.src + "\")\n"
> + "with client width / height: " + imgWidth + "px" + "
> / " + imgHeight + "px\n"
> + "modified to width / height: " + imgNode.clientWidth +
> "px
> / " + imgNode.clientHeight + "px"
> + " (" + Math.round(imgNode.clientWidth / imgWidth * 100
> ) + "% / " + Math.round(imgNode.clientHeight / imgHeight * 100) + "%)"
> );
> }
> }
> }
>
> );
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/greasemonkey-users.
For more options, visit https://groups.google.com/d/optout.