Activate "allow scripts globally" in prefs.js

Ask for help about NoScript, no registration needed to post
PGMario
Posts: 3
Joined: Sat Mar 30, 2013 7:15 pm

Activate "allow scripts globally" in prefs.js

Post by PGMario »

Hi there,

Thanks for the great add-on.
I have installed Debian Wheezy (Firefox 10-ESR) on the desktop computers of a company with non tech-savvy users. I would like to block Java while allowing Javascript globally. I know how that can be achieved with the GUI, but I will have to deploy it to a lot of PCs with existing Firefox profiles. Adding something like to the system-wide equivalent of prefs.js (/etc/iceweasel/pref/iceweasel.js on Debian)

Code: Select all

lockPref("noscript.forbidJava", true);
lockPref("noscript.global", true);
will block Java also on whitelisted sites, but is there an option to do the same thing for "allow scripts globally"?
I know about the dangers of this, but I must make sure the employees get at least some degree of protection without having to whitelist anything themselves.

Thanks a lot!
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130323 Firefox/17.0 Iceweasel/17.0.4
User avatar
therube
Ambassador
Posts: 7991
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Activate "allow scripts globally" in prefs.js

Post by therube »

Code: Select all

user_pref("noscript.global", true);
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 SeaMonkey/2.18a2
PGMario
Posts: 3
Joined: Sat Mar 30, 2013 7:15 pm

Re: Activate "allow scripts globally" in prefs.js

Post by PGMario »

Thank you, therube.
Didn't get an email-notification of your reply. That's why I'm so late to reply.
I had tried that (as you can see above), but it somehow didn't work out. Now it does, don't know what I made wrong the first time around.
Anyway, here is what you have to enter for noscript to only block plugins, not javascript, on all sites:

Code: Select all

user_pref("noscript.global", true);
user_pref("noscript.contentBlocker", true);
replace user_pref with lockPref in the system-wide config if you don't want users to change the values.
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Firefox/17.0 Iceweasel/17.0.5
PGMario
Posts: 3
Joined: Sat Mar 30, 2013 7:15 pm

Re: Activate "allow scripts globally" in prefs.js

Post by PGMario »

Nope, I thought it worked, but it didn’t. When I use

Code: Select all

lockPref("noscript.global", true);
"allow scripts globally" is not activated BUT it is locked! That means I cannot activate it in the menu anymore, so the option is recognized but not used correctly. about:addons tells me that noscript.global is true and locked.
I have no other add-ons installed.
Probably a bug?
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Firefox/17.0 Iceweasel/17.0.5
Post Reply