A solution to the injectJS bug of K-Meleon 1.7 (updated)
Posted by: realgy
Date: February 15, 2013 02:46PM

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 05:00PM by realgy.

Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: Mala Okeh
Date: February 15, 2013 06:20PM

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.

Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: realgy
Date: February 15, 2013 08: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 09:12PM by realgy.

Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: adodupan
Date: February 15, 2013 08:26PM

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

Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: realgy
Date: February 15, 2013 08: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 09:04PM by realgy.

Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: adodupan
Date: February 15, 2013 10:45PM

OK, this one is enough.
Last year, on hybrid ff3626 based, i have tried to solve problem right click in xul, but i failed.
I am interested if anybody has solved this problem.

Regards to all

Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: rodocop
Date: October 12, 2013 01:03PM

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

_____________________________________
Using K-Meleon-1.6db+NS by dugbug / KM-16-S2014
1.6beta2.6 by JamesD
_____________________________________
Recommending K-Meleon Twin+`||`Discuss it!!!
_____________________________________
New KM74 for test and feedback! Get It!

Re: A solution to the injectJS bug of K-Meleon 1.7
Posted by: siria
Date: March 05, 2014 06:52AM

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/05/2014 06:56AM by siria.

K-Meleon forum is powered by Phorum.