Bugs :  K-Meleon Web Browser Forum
You can talk about issues with k-meleon here.  
pageToggleJS feature or bug?
Posted by: rodocop
Date: May 18, 2015 10:12PM

Well, I found that one can toggle JS for single page OFF when navToggleJS is ON.

But you cannot do vice versa: pageToggleJS ON when navToggleJS is OFF.

Is it so by design or this is a bug?

Options: ReplyQuote
Re: pageToggleJS feature or bug?
Posted by: JohnHell
Date: May 18, 2015 11:00PM

AFAIK by design.

You can't enable and disable JS for a page, if JS is not enabled globally.

navToggleJS, enables "javascript.enabled preference as setting it to true. pageToggleJS, doesn't.

Dorian should tell if this is unavoidable, but my guess is that it is unavoidable.

Options: ReplyQuote
Re: pageToggleJS feature or bug?
Posted by: siria
Date: May 20, 2015 09:38PM

Hmm, trying to understand that: does it mean, when surfing with blocked JS by default and only occasionally wanting to allow the current page, not all, that always both settings must be toggled simultaneously? So that hopefully the background pages are still locked by pageJS, when the global JS gets enabled?

Options: ReplyQuote
Re: pageToggleJS feature or bug?
Posted by: JohnHell
Date: May 20, 2015 10:09PM

Quote
siria
Hmm, trying to understand that: does it mean, when surfing with blocked JS by default and only occasionally wanting to allow the current page, not all, that always both settings must be toggled simultaneously? So that hopefully the background pages are still locked by pageJS, when the global JS gets enabled?

If you are surfing with JS blocked and you want your current page to allow javascript, you need to enable JS globally AND reload the page. The other pages, if were loaded with JS blocked, won't run any script.

The pageToggleJS is to stop running scripts in that page, not to block JS.

navToggleJS is the same as it was earlier in K-meleon, that toggled javascript.enabled preference, but with the ability to stop scripts as Mozilla removed the feature. Do you remember that if you didn't want to run scripts in a page you should load that page with JS disabled because otherwise they won't stop after toggling javascript.enabled thanks to Mozilla decision?

So, understanding that, what pageToggleJS does is expanding that feature to make it "locally" to the current page where you execute it.

But, it doesn't work globally, it can't enable or disable JS globally by changing the value of javascript.enabled.

Instead, works as a way to stop scripts in a page without blocking JS globally. Let's say you want scripts running in this page but not in twitter.com (very high CPU usage indeed). You'll execute pageToggleJS when you are focusing twitter.com, and will stop scripts there. But you will still be able to, for example, use the rich posts editor, that needs javascript.


I'd try to "draw" it:
Function	JS enabled	Result

navToggleJS	disabled	disabled for all pages and stops scripts; executing again will allow scripts
pageToggleJS	enabled		stops scripts in the current page; executing again will allow scripts in the page


Function	JS disabled	Result

navToggleJS	enabled		enables JS; scripts will run only if the page was loaded with JS enabled; executing again disables JS
pageToggleJS	disabled	no change at all; executing again will do nothing



Edited 1 time(s). Last edit at 05/20/2015 10:10PM by JohnHell.

Options: ReplyQuote
Re: pageToggleJS feature or bug?
Posted by: Dorian
Date: May 20, 2015 11:12PM

I guess you can say this is by design.
It could be done differently but at least, you're sure that js is totally disabled that way.

Options: ReplyQuote


K-Meleon forum is powered by Phorum.