Extensions
: K-Meleon Forum
All about K-Meleon extensions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] Just some information on how I use Policy Manager. I find that I need to change the default policy regarding Javascript quite often. I created a macro to allow me to do that from a button. See this thread for more information: http://kmeleon.sourceforge.net/forum/read.php?1,113221,113782#msg-113782 Now I have whitelists and blacklists and a quick way to change the default. In order to get around the problem that some of KM's items like "send page as a link" under "Mail" need injectJS, I have added some code to check the policy manager default. See this thread to find where I got the idea: http://kmeleon.sourceforge.net/forum/read.php?9,116553,116563#msg-116563 This is the code that I changed in Main.kmm. I will likely change every instance of injectJS just to make everything automatic. [code] JS_hndlTop{ # Same as JS_hndlDoc, but only for the topmost frame (to avoid cross site scripting). $FlipFlip = false; getpref( STRING, "capability.policy.default.javascript.enabled")=="noAccess" ? $FlipFlip=true : 0 ; $FlipFlip == true ? togglepref( STRING, "capability.policy.default.javascript.enabled", "noAccess", "allAccess") : 0; injectJS("(function(){".$JS_func.$_JS_urlencode."with(document){".$JS_doit."}".$JS_last."})()"); $FlipFlip == true ? togglepref( STRING, "capability.policy.default.javascript.enabled", "noAccess", "allAccess") : 0; $JS_doit=""; $JS_func=""; $JS_last=""; $JS_fail=""; } [/code][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development