Difference between revisions of "User:Hendy:Noscript"

From Camino Wiki
Jump to navigation Jump to search
 
Line 4: Line 4:
  
 
user_pref("capability.policy.policynames", "jsok");
 
user_pref("capability.policy.policynames", "jsok");
 +
 
user_pref("capability.policy.default.javascript.enabled", "noAccess");
 
user_pref("capability.policy.default.javascript.enabled", "noAccess");
 +
 
user_pref("capability.policy.jsok.javascript.enabled", "allAccess");
 
user_pref("capability.policy.jsok.javascript.enabled", "allAccess");
  

Revision as of 19:21, 13 November 2008

Request for "No Script"-like Java Script whitelist in Camino.

To set up a system to block javascript by default, set javascript.enabled = true and have

user_pref("capability.policy.policynames", "jsok");

user_pref("capability.policy.default.javascript.enabled", "noAccess");

user_pref("capability.policy.jsok.javascript.enabled", "allAccess");

in user.js, or with PreferenceManager

to add sites to the whitelist:

[[PreferenceManager sharedInstance] setPref:"capability.policy.jsok.sites" toString:@"http://www.ballcocknuts.com"];

where the string is a space-delimited list of the sites to have in the whitelist

a reload is necessary after a setPref