Ok. As for your questions 1 and 2 my answer is yes. And I refined a bit the previous script so it can check on the actual sizes and shrink them if they are more than 600px.
And for question 3, if they are already loaded into the page, why do we want to “pre”-load them again? And the script: // ==UserScript== // @name ChangeLayoutHowtogeek // @namespace nsChangeLayoutHowtogeek // @description Change Layout HowToGeek // @include http://*.howtogeek.com/* // @version 1.2.1 // @grant none // ==/UserScript== (function (){ var imgNodes = document.getElementsByTagName("img"), imgNode, i = imgNodes.length -1, imgWidth; for (;;i--) { imgNode = imgNodes[i]; imgWidth = imgNode.clientWidth; if (imgWidth >= 600){ imgNode.style.width = "70%"; imgNode.style.height = "70%"; console.log('Image with client width: ' + imgWidth + 'px modified to 70%'); } } })(); Ákos Feladó: [email protected] Elküldve: szerda, 2015. január 7. 8:36 Címzett: [email protected] Ok I can find all images from a webpage with a width of exactly 650px by a GM script command like: var imgNodes = document.querySelectorAll('img[width="650"]'); 1.) But is there a way to find all images from a webpage with a size of 650px AND MORE? 2.) Is there a way to find all images from a webpage with NO WIDTH specification? 3.) Assume there is no width spec given can I pre-load an image from server (from GM script), then find out the dimension and decide depending on the current, real original image width what to do (which CSS to apply)? Thank you Ben -- 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.
