Improvement requests :  K-Meleon Forum
Use this forum to talk about a feature you're missing.  
Re(load) All Images on Current Page
Posted by: nujucobian
Date: June 06, 2012 12:09PM

For fast browsing I usually block immages, but when i wanna see images I don't wanna have to right-click every image to re(load) and sometimes the placeholder is not showing. So is it possible to do this with 'one click load all' or is this already implemented?

P.S. I don't wanna reload/refresh the whole page as it would be slow loading with js,css,etc.

Options: ReplyQuote
Re: Re(load) All Images on Current Page
Posted by: rodocop
Date: June 06, 2012 08:22PM

I don't know how to do exactly what you ask for, but I think the next thing could be useful in some cases:

1) Press F9 (to load images)
2) Select View -> Images
this command would open new window (tab) with all the images from loaded page.
3) Toggle images off, pressing F9 again.


Try K-Meleon-1.6db+NS by dugbug // KM-16-S2014 by Fred // 1.6beta2.6 by JamesD

K-Meleon Twin+ Download for modern browsers =//= Download for old ones =//= Discuss it!!!

New KM74.0 for test and feedback! Get it there!


Options: ReplyQuote
Re: Re(load) All Images on Current Page
Posted by: nujucobian
Date: June 07, 2012 10:08AM

but i won't know where the position of the images.
I'm looking more like 'ImgLikeOpera' for firefox extension.

Options: ReplyQuote
Re: Re(load) All Images on Current Page
Posted by: rodocop
Date: June 07, 2012 10:22PM

I understand. KM is missing such a possibility.

I think it could be possible to create KM-macro for on-demand reload for all images on the page. But I'm not sure.

But I can help you using third-party universal javascript-bookmarklet.

Look:

1) Open Bookmarks Editor by pressing Ctrl+G

2) Create new Bookmark in Personal Toolbar Folder (right-click on it and select New Bookmark)

3) In Properties (below) insert intuitive name in the 'Title:' field - like, for example, Reload images (you could wish to make name as short as possible to make 'button' on Personal Toolbar smaller)

4) Further, fill the 'URL' field with following string:
javascript:function%20reloadImages(w){try{for(var%20j=0;IMG=w.document.images[j];++j){if(IMG.readyState!='complete')IMG.src=IMG.src;}for(var%20i=0;F=w.frames;i++){reloadImages(F);}}catch(e){}}reloadImages(window);
triple-click string line above to fully select - and then copy it

5) Press OK - and your little tool is ready to use.

Now, when you need display images on loaded page - just press F9 (enable images) and then click the Reload Images bookmark - and you'll get it!

NB! Don't forget press F9 again to re-disable images for further browsing.


Try K-Meleon-1.6db+NS by dugbug // KM-16-S2014 by Fred // 1.6beta2.6 by JamesD

K-Meleon Twin+ Download for modern browsers =//= Download for old ones =//= Discuss it!!!

New KM74.0 for test and feedback! Get it there!


Options: ReplyQuote
Re: Re(load) All Images on Current Page
Posted by: nujucobian
Date: June 08, 2012 11:04PM

nice idea, doesn't work though, cpu usage 100%
I'm using
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.4.2",function($,L){$("*").each(function(index){if($(this).css("background-image")!="none"){url=$(this).css("background-image");url=url.replace(/"/g,"").replace(/url\(|\)$/ig,"");url=url+(url.indexOf("?")==-1?"?r=":"&nyz=")+Math.random();url='url("'+url+'")';$(this).css("background-image",url);}});$("img").each(function(index){url=$(this).attr("src");url=url+(url.indexOf("?")==-1?"?r=":"&nyz=")+Math.random();$(this).attr("src",url);});});
taken from http://diovo.com/2010/08/reimages-reload-images-in-web-pages/

Options: ReplyQuote
Re: Re(load) All Images on Current Page
Posted by: rodocop
Date: June 09, 2012 02:05AM

which solution doesn't work? Mine or yours?

I have tested my bookmarklet with my build (CommMeleon) and it works fine, superfast and without any problem.


Try K-Meleon-1.6db+NS by dugbug // KM-16-S2014 by Fred // 1.6beta2.6 by JamesD

K-Meleon Twin+ Download for modern browsers =//= Download for old ones =//= Discuss it!!!

New KM74.0 for test and feedback! Get it there!


Options: ReplyQuote
Re: Re(load) All Images on Current Page
Posted by: misterp
Date: June 09, 2012 03:52AM

I've found in such situations that images are most of the download and so just reloading the page with all images is easiest(F9, F5, F9).

Options: ReplyQuote
Re: Re(load) All Images on Current Page
Posted by: nujucobian
Date: June 09, 2012 08:14AM

@rodocop
yours didn't work. I'm using 1.5.4 and 1.6.0 beta2

@misterp
hmm...3 keyboard actions, i prefer mouse click and for heavy javascript page, page loading become slow and high CPU usage (ex. blogger dynamic view)

Here's an idea but I don't know how to make a macro
1. Set "permissions.default.image" to 1
2. Inject javascript to reload all images
3. Set "permissions.default.image" back to 2

Options: ReplyQuote
solved
Posted by: nujucobian
Date: June 18, 2012 06:05AM

made it finally

reloadimages{
menugrayed=(hostname($URL)=="");
$_jscurrent=getpref(BOOL,$pref_JavaScript);
setpref(BOOL,$pref_JavaScript, true);
$_imgcurrent=getpref(INT,$pref_Images);
setpref(INT,$pref_Images, 1);
$reloadimgjs=$_scripts_path."\\reloadimg.js";
$injectreloadimg=readfile($reloadimgjs);
injectJS($injectreloadimg);
setpref(INT,$pref_Images, $_imgcurrent);
setpref(BOOL,$pref_JavaScript, $_jscurrent);
}

Thanks to a bunch of macros.

Options: ReplyQuote
Re: Re(load) All Images on Current Page
Posted by: Merlin
Date: October 28, 2012 10:40AM

I was facing the same problem until i write this script:


# ----------------------Reload All Images----------------------------------------

Reload_All_Images{
statusbar("Reload All Image ");
$s_im =false;
getpref(INT,$pref_Images)==1? $s_im = true:setpref(INT,$pref_Images,1);
$JS_doit="var m=document.images;for (i=0;i< m.length ;i++ ){var sd=m[i].src;m[i].src='';m[i].src=sd;}";&JS_hndlDoc;
$s_im ?0:setpref(INT,$pref_Images,2);

}

ReloadAllImages_BuildToolbar{
pluginmsg(toolbars,"AddToolbar","Reload All Images,64,16","");
pluginmsg(toolbars,"AddButton","Reload All Images,Imagereload,macros(Reload_All_Images),,Reload All Images,64,16,ReloadImages.bmp[1],ReloadImages.bmp[0],","");
}

#----------------------------

$OnSetup=$OnSetup."ReloadAllImages_BuildToolbar;";
$macroModules=$macroModules."ReloadImages";



It work without enable Javascrip or useing jQuery file .

Use this image [img]http://i.cubeupload.com/n89b6F.jpg[/img] & rename it To (ReloadImages.bmp).

And save it in kM-Folder\skins\default. If there no "default" folder , create one.

To test it , block images [F9] , reload the page and press the button on the toolBar.

Options: ReplyQuote
Re: Re(load) All Images on Current Page
Posted by: Upen
Date: February 23, 2014 05:01PM

hello friends, i don't know how to make a script or macro to reload images. help me.

Options: ReplyQuote
Re: Re(load) All Images on Current Page
Posted by: siria
Date: February 25, 2014 05:40AM

Nice script, great function, thanks! smiling smiley
Finally managed to extend an old unfinished macro of mine with that nice function, exactly what I needed. Then it drove me crazy that sometimes it worked and sometimes not, seemingly randomly, until finally realizing that another pref must be allowed, that thing with images JS-rollover permission. At last this works now exactly as I want, love it, just can't publish yet because other stuff isn't finished yet.

Quote
Upen
hello friends, i don't know how to make a script or macro to reload images. help me.

The how-to description was in the previous post, he only forgot one little basic thing, well known to long-time users:
Open some text editor like notepad, copy the posted code lines from Merlins post into a new document, and save it as "ReloadAllImages.kmm" into the K-Meleon "macros" folder. Make sure it does not have a hidden ".txt" ending too. If you like, copy the link to this forum or other comments in the beginning too, with a comment sign # at the beginning of each line.
Then save his button image exactly as he described and restart the browser.



Edited 1 time(s). Last edit at 02/25/2014 05:41AM by siria.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.