Development :
K-Meleon Web Browser Forum
K-Meleon development related discussions.
Reload Image in K-M 1.0
Posted by:
Rapido
Date: July 20, 2006 06:40PM
Hi! I just wonder how to get an Reload Image button and Macro in K-meleon 1.0?
I don't know where to put in this cool looking new browser. Can someone help please?
Yours: Rapido
Re: Reload Image in K-M 1.0
Posted by:
Rapido
Date: August 06, 2006 10:06PM
Hi! I wonder if the reloadimage macro will be updated to work with K-meleon 1.0?
As it is now this macro is needed by me and perhaps other user want it to. So can someone tell if or how to make it work in k-meleon 1.0.
Yours: Rapido
Re: Reload Image in K-M 1.0
Posted by:
guenter
Date: August 07, 2006 01:44AM
IMHO will be updated. though, i do not know who invented it.
rapido - we have a core dev and other devs that are using k-m themselves
- things have improved.
Problem: FR and DE devs have holidays now.
At the moment here is jsnj ... and a few other macro coders that may hopefully know. Who are maybe not away.
p. s. thx for Your beautifull themes & skins - & greetings to SE from DE
Re: Reload Image in K-M 1.0
Posted by:
rmn
Date: August 07, 2006 07:24AM
Rapido,
Try changing "JSEnable" to "hndlDocs".
Re: Reload Image in K-M 1.0
Posted by:
rmn
Date: August 07, 2006 07:31AM
Oops, won't work. Try this one:
ReloadImage
{
$tmp=true; getpref(INT,$images)==2 ? &ImgToggle : $tmp=false;
$tmq=true; getpref(BOOL,"dom.disable_image_src_set") ? togglepref(BOOL,"dom.disable_image_src_set") : $tmq=false;
-------the following should be in one line--------
$JSfunc="function chkImg(e){var t='".$ImageURL."',i=e.document.images;for(var j=0;j<i.length;j++)if(i[j].src==t){i[j].src="";i[j].src=t;}}function chkFrm(e){var f=e.frames;for(var j=0;j<f.length;j++)chkFrm(f[j]);chkImg(e);}";
-------end of line---------
$JSdoit="chkFrm(top)";
&hndlDocs;
$tmp ? &ImgToggle : "";
$tmq ? togglepref(BOOL,"dom.disable_image_src_set") : "";
}
Re: Reload Image in K-M 1.0
Posted by:
rmn
Date: August 07, 2006 07:43AM
Wrong again.
ReloadImage
{
$tmp=true; getpref(INT,$images)==2 ? &ImgToggle : $tmp=false;
$tmq=true; getpref(BOOL,"dom.disable_image_src_set") ? togglepref(BOOL,"dom.disable_image_src_set") : $tmq=false;
$JSfunc="";
-------the following should be in one line--------
$JSdoit="var t='".$ImageURL."',i=images;for(var j=0;j<i.length;j++)if(i[j].src==t){i[j].src="";i[j].src=t;}";
-------end of line---------
&hndlDocs;
$tmp ? &ImgToggle : "";
$tmq ? togglepref(BOOL,"dom.disable_image_src_set") : "";
}
Re: Reload Image in K-M 1.0
Posted by:
Rapido
Date: August 07, 2006 09:01AM
Hi! Thanks! But where do I put this macro?
Yours: Rapido
Re: Reload Image in K-M 1.0
Posted by:
rmn
Date: August 07, 2006 01:09PM
Add it to the bottom of macros.cfg. In menus.cfg, you should add macros(ReloadImage) to ImagePopup, ImageLinkPopup, etc.
Re: Reload Image in K-M 1.0
Posted by:
Rapido
Date: August 07, 2006 08:46PM
Hi! I can't see any button anywhere in any place so it must be something wrong with this or I'm doing something wrong. Can you please show how it should look in macros.cfg and in menus.cfg to work please.
Yours: Rapido
Re: Reload Image in K-M 1.0
Posted by:
rmn
Date: August 08, 2006 09:41AM
Add this to the end of macros.cfg:
ReloadImage {
$tmp=true; getpref(INT,$images)==2 ? &ImgToggle : $tmp=false;
$tmq=true; getpref(BOOL,"dom.disable_image_src_set") ? togglepref(BOOL,"dom.disable_image_src_set") : $tmq=false;
$JSfunc="";
$JSdoit="var t='".$ImageURL."',i=images;for(var j=0;j<i.length;j++)if(i[j].src==t){i[j].src="";i[j].src=t;}";
&hndlDocs;
$tmp ? &ImgToggle : "";
$tmq ? togglepref(BOOL,"dom.disable_image_src_set") : "";
}
Open menus.cfg, and search for the "I&mage" macro. Add the "macros(ReloadImage, Reload Image)" command inside. Your new Image macro should look something like this:
I&mage{
macros(ReloadImage, Reload Image)
&View Image=ID_VIEW_IMAGE
macros(ZoomInImage,Zoom I&n)
macros(ZoomOutImage,Zoom Ou&t)
-
&Save Image As...=ID_SAVE_IMAGE_AS
macros(EmailImageURL,Sen&d Image As Link...)
-
C&opy Image=ID_COPY_IMAGE_CONTENT
&Copy Image URL=ID_COPY_IMAGE_LOCATION
%ifplugin macros
-
macros(ImageInfo,Image &Properties)
macros(ImageCache,Cache &Information)
%endif
}
Actually it doesn't matter where you put the macros(ReloadImage) command, as long as it's inside the Image macro.
To use it, right-click on the image you want to reload, then choose "Reload Image".
Re: Reload Image in K-M 1.0
Posted by:
Rapido
Date: August 08, 2006 12:47PM
Well I've done as it looks above but nope it's not working. So there must be something wrong. I'm going nutz here.please tell me whats wrong someone?
My K-m 1.0 macros cfg looks like this:
ReloadImage {
$tmp=true; getpref(INT,$images)==2 ? &ImgToggle : $tmp=false;
$tmq=true; getpref(BOOL,"dom.disable_image_src_set") ? togglepref(BOOL,"dom.disable_image_src_set") : $tmq=false;
$JSfunc="";
$JSdoit="var t='".$ImageURL."',i=images;for(var j=0;j<i.length;j++)if(i[j].src==t){i[j].src="";i[j].src=t;}";
&hndlDocs;
$tmp ? &ImgToggle : "";
$tmq ? togglepref(BOOL,"dom.disable_image_src_set") : "";
}
And my K-m 1.0 menus.cfg looks like this:
:Frame &Properties
}
I&mage{
macros(ReloadImage, Reload Image)
&View Image=ID_VIEW_IMAGE
macros(ZoomInImage,Zoom I&n)
macros(ZoomOutImage,Zoom Ou&t)
-
&Save Image As...=ID_SAVE_IMAGE_AS
macros(EmailImageURL,Sen&d Image As Link...)
-
C&opy Image=ID_COPY_IMAGE_CONTENT
&Copy Image URL=ID_COPY_IMAGE_LOCATION
%ifplugin macros
-
macros(ImageInfo,Image &Properties)
macros(ImageCache,Cache &Information)
%endif
}
# ----- Documents
Document{
!Nav
-
bookmarks(Add,Add Page To &Bookmarks\tCtrl+D)
favorites(Add,Add Page To Fa&vorites)
hotlist(Add,Add Page To H&otlist)
&Save Page As...\tCtrl+S=ID_FILE_SAVE_AS
macros(EmailURL,Sen&d Page As Link...)
%ifplugin macros
:Op&en Page With
%endif
-
!DocumentSelection
-
}
DocumentPopup{
!Document
age &Properties
!Fullscreen
bmpmenu()
}
DocumentImagePopup{
!Document
age Pro&perties
!Fullscreen
bmpmenu()
}
FrameDocumentPopup{
!Document
age &Properties
:&Frame
!Fullscreen
bmpmenu()
}
FrameDocumentImagePopup{
!Document
age Pro&perties
:&Frame
!Fullscreen
bmpmenu()
}
# ----- Links
LinkPopup{
!Link
bmpmenu()
}
ImageLinkPopup{
!Link
:I&mage
bmpmenu()
}
FrameLinkPopup{
!Link
:&Frame
bmpmenu()
}
FrameImageLinkPopup{
!Link
:I&mage
:&Frame
bmpmenu()
}
# ----- Images
ImagePopup{
!I&mage
bmpmenu()
}
FrameImagePopup{
!I&mage
-
:&Frame
bmpmenu()
}
Can someone see whats wrong?
Yours: Rapido
Re: Reload Image in K-M 1.0
Posted by:
rmn
Date: August 08, 2006 01:57PM
Do you get the "Reload Image" menu entry if you right-click on an image?
Re: Reload Image in K-M 1.0
Posted by:
Rapido
Date: August 08, 2006 03:36PM
Nope nothing shows up.
Re: Reload Image in K-M 1.0
Posted by:
Rapido
Date: August 08, 2006 04:18PM
I just discovered that the profile box inside K-meleon 1.0 map was empty so that is perhaps the reason why nothing work!!! Could it be the reason?
Yours: Rapido
Re: Reload Image in K-M 1.0
Posted by:
Rapido
Date: August 08, 2006 04:46PM
Hurray!!! It actually works now when I reinstalled K-Meleon1.0 and got the profile map full of needed things such as macro.cfg and menus.cfg. So bingo that was the goofyplay made by K-Meleon1.0.
Yours: Rapido
Re: Reload Image in K-M 1.0
Posted by:
rmn
Date: August 08, 2006 05:30PM
Cool. Glad to hear that.
Re: Reload Image in K-M 1.0
Posted by:
Jeff
Date: August 08, 2006 06:36PM
I'm having the same problem - the menu item doesn't show up.
Re: Reload Image in K-M 1.0
Posted by:
Rapido
Date: August 08, 2006 08:21PM
Check and see if you have a profilemap in K-Meleon1.0 directory. If not reinstall the browser and use K-Meleon1.0setup.exe and then start the browser and fix with bookmarks or make some other changes then restart the browser and check your K-Meleon1.0 directory to see if profilemap has been created. If so put the macros above in the cfg's made in profiledirectory. Then restart and it should work.
Yours: Rapido
Re: Reload Image in K-M 1.0
Posted by:
Jeff
Date: August 09, 2006 08:55AM
Rapido: Apparently all I needed was a reboot - I have the menu item now.
However, I don't think this is what I needed. When I click 'reload image' I see some network activity, but the image doesn't redownload - I think it only reloads from cache. Maybe I need something like 'refresh image' (same as F5)? Would that be possible?