General :  K-Meleon Web Browser Forum
General discussion about K-Meleon 
A solution to the injectJS bug of K-Meleon 1.7 (updated)
Posted by: realgy
Date: February 15, 2013 07:46AM

Download Link: ((the third update at 02/17/2013))
http://code.google.com/p/k-meleon/downloads/detail?name=hndlDocs(km1.7alfa).kmm

If you are using K-Meleon 1.7, there are many invalid macros what contain JavaScript code to handle docs/links/images in KM1.7 because of the injectJS bug. This file can solve the problem. By this file you can use all those macros in KM1.7 like in KM1.6.

Like these macros: Reload Image, Image Properties, Link Properties, all macros in the menu "Page Properties", Scroll To Top/Buttom Of Page (Mouse Gestures), DisableCSS, Zoom_Reset and so on.

Just download this kmm file and copy to the macros folder. Then you can use all the macros above-mentioned.

Before you use those macros, you should enable JavaScrip first (some macros need that popup window is allowed too like macros in the menu "Page Properties") , KM1.7 cannot auto toggle these prefers because of the invalid injectJS statement. (except the macro "Reload Image" since I have rewrote it in this file to make it convenient.)

Note: This file has not fixed the injectJS bug, It just gived an alternative for useing JS code through macros in KM1.7. It's just a trick but it is very useful. If you use KM1.7 you should download it.

I have updated the file three times to solve the encodeurl problem. The Engine is different from KM1.6 so I must ensure that this file could handle all Links/Images with urls encoded by UTF or Non-UTF. Now the updated file works OK.

----------------------------------------------------



BTW:

I am useing a custom K-Meleon version based on K-Meleon/1.7db+ verion. On age of machines KM1.7 don't freeze frequently when open some larg pages but KM1.6 do. KM1.7 with the Gecko engine v1.9.2 has a much higher JavaScript performence than KM1.6 (but KM1.6 has a higher CSS performence than KM1.7, I don't know why yet), and KM1.7 also can correctly render some webpages what could not be correctly rendered by KM1.6.

But KM1.7 is an alfa version yet, and it still has some big bugs: injectJS statement is invalid, the focus of current page will lost when you open a new tab, history plugin is broken, no password function, no Right-click menu in xul...

Dose anyone know that would a newer version come or not?



Edited 16 time(s). Last edit at 02/17/2013 10:00AM by realgy.

Options: ReplyQuote
Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: Mala Okeh
Date: February 15, 2013 11:20AM

It works phantastically ! Thanks very much.

If now someone could make AdblockPlus and NoScript work as it should then K-Meleon 1.7 could replace K-meleon 1.6 even in its alpha station.

Options: ReplyQuote
Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: realgy
Date: February 15, 2013 01:13PM

Quote
Mala Okeh
It works phantastically ! Thanks very much.

If now someone could make AdblockPlus and NoScript work as it should then K-Meleon 1.7 could replace K-meleon 1.6 even in its alpha station.

Is AdblockPlus invalid in KM 1.7? I just know it from your comment.
I haven't used AdblockPlus for a long while, I am useing Ad Muncher v4.93 to block Ads now. AdMuncher probably is the most powerful application for blocking Ads in the world. If AdblockPlus cannot be fixed in KM1.7, you can try it. Even when you use KM1.6 you can try AdMuncher instead of AdblockPlus too.

BTW, I am writing a macroModule to solve the losting focus bug of KM1.7 now. I will release it soon.



Edited 3 time(s). Last edit at 02/15/2013 02:12PM by realgy.

Options: ReplyQuote
 
Posted by: adodupan
Date: February 15, 2013 01:26PM

 



Edited 1 time(s). Last edit at 02/29/2016 07:29PM by adodupan.

Options: ReplyQuote
Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: realgy
Date: February 15, 2013 01:58PM

Quote
adodupan
Quote
realgy
KM1.7 also can correctly render some webpages could not be correctly rendered by KM1.6.

realgy or someone, would you put 5-6 links to websites where you can clearly see the difference in rendering

Regards

Here you are (but it is not a english website, so I translated it by google):

http://translate.google.com.hk/translate?act=url&hl=zh-CN&ie=UTF8&prev=_t&sl=zh-CN&tl=en&u=http://club.kdnet.net/list.asp%3Fboardid%3D1

KM 1.6 cannot correctly render the User Login interface in the right of the webpage but KM1.7 could do it perfectly.



Edited 1 time(s). Last edit at 02/15/2013 02:04PM by realgy.

Options: ReplyQuote
 
Posted by: adodupan
Date: February 15, 2013 03:45PM

 



Edited 1 time(s). Last edit at 02/29/2016 07:30PM by adodupan.

Options: ReplyQuote
Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: rodocop
Date: October 12, 2013 06:03AM

one more example of site where 1.6 fails and 1.7 - not:
http://maps.yandex.ru/

Options: ReplyQuote
Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: siria
Date: March 04, 2014 11:52PM

Thanks for the macro, very helpful.

Just one request, people who have disabled javascript usually do so for a very good reason. Otherwise it would be enabled all the time. So if it's automatically switched on by a macro for some action, it should also automatically be switched off again. Otherwise users won't even notice. Unfortunately have seen that quite often already in various macros, it seems rather impossible for JS fans to understand that it can cause damage to others, when it's secretly switched on and stays :-/

Unfortunately there's yet another bug in KM1.7, it seems to do all macro lines simultaneously instead of one after the other, so it already has the prefs toggled back while the action itself isn't finished yet, kinda stupid sad smiley
So far I don't know of any way to fix it, and the only lousy workaround I've found so far is a little info box popping up, to get a split second more time.
So if anyone else would like to have his original prefs restored, they can try this instead. It's longer, but it also toggles more prefs, incl. policy manager.
If images, image-roll-over, javascript and policy-manager were all allowed before, there will be NO info box of course.

JS_reloadImage{
macroinfo=_("km17hndlDocs Reload the current image");
&pref_ToggleOnJSIMG;
$JS_doitImage="var t=src;src='';src=t"; $JS_doitInput=$JS_doitImage;
&JS_hndlImage;
&pref_ToggleOffJSIMG;
}
pref_ToggleOnJSIMG{
$__oriP1=getpref(BOOL,"javascript.enabled");
$__oriP1=="true"? 0 : setpref(BOOL,"javascript.enabled","true");
$__oriP2=getpref( STRING, "capability.policy.default.javascript.enabled");
$__oriP2=="allAccess" ? 0 : setpref( STRING, "capability.policy.default.javascript.enabled","allAccess");
$__oriP3=getpref(BOOL,"dom.disable_image_src_set");
$__oriP3=="true"? setpref(BOOL,"dom.disable_image_src_set","false") : 0;
# images: 1=all 2=never 3=site only
$__oriP4=getpref( INT, $pref_Images);
$__oriP4=="1" ? 0 : setpref(INT,$pref_Images,"1");
}
pref_ToggleOffJSIMG{
if ($__oriP1!="true" or oriP2!="allAccess" or $__oriP3=="true" or $__oriP4!="1")
alert("(little break for bugfix in KM1.7+)","OK");
$__oriP1=="true"? 0 : setpref(BOOL,"javascript.enabled","false");
$__oriP2=="allAccess" ? 0 : setpref( STRING, "capability.policy.default.javascript.enabled",$__oriP2);
$__oriP3=="true"? setpref(BOOL,"dom.disable_image_src_set","true") : 0;
$__oriP4=="1"? 0 : setpref(INT,$pref_Images,$__oriP4);
&_pref_SyncButtons;
}




Edited 1 time(s). Last edit at 03/04/2014 11:56PM by siria.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.