Hi there!

I made your script with only a few changes in the code, and it is working for 
me. And the images are set with attributes and not with css styles, so here we 
are:


// ==UserScript==
// @name        ChangeLayoutHowtogeek
// @namespace   nsChangeLayoutHowtogeek
// @description Change Layout HowToGeek
// @include     http://*.howtogeek.com/*
// @version     1.2.0
// @grant       none
// ==/UserScript==


var imgNodes = document.querySelectorAll('img[width="650"]');


for (var i = 0; i < imgNodes.length; i++) {
  imgNodes[i].setAttribute("width","70%");
  imgNodes[i].setAttribute("height","70%");
}







Regards

Ákos





Feladó: 'Ben' via greasemonkey-users
Elküldve: ‎kedd‎, ‎2015‎. ‎január‎ ‎6‎. ‎6‎:‎50
Címzett: [email protected]






Ok, but the image is still NOT shrinked.




How can I achieve a picture shrinking from GM script if the width is specifed 
by "style" value?

On Tuesday, 6 January 2015 00:42:37 UTC+1, Matt Sargent wrote:

On 1/5/2015 12:59 PM, 'Ben Stover' via greasemonkey-users wrote: 
That's possibly because the width dimension is specified as a style 
value, and not a "width" attribute. 



-- 
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.

-- 
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.

Reply via email to