TrungNg
TrungNg

Reputation: 63

Firefox - Set capability not working

I want to block image and Javascript from third-part on load, and edit user.js in profile folder to merge with pref.js when Firefox startup. Here's my code in user.js:

user_pref("capability.policy.policynames", "noimage, nojs, nohrefs");
user_pref("capability.policy.nojs.sites", "http://abc.xyz https://abc.xyz");
user_pref("capability.policy.nojs.javascript.enabled", "noAccess");
user_pref("capability.policy.noimage.sites", "http://abc.xyz https://abc.xyz");
user_pref("capability.policy.noimage.permissions.image", 3);
user_pref("capability.policy.nohrefs.sites", "http://abc.xyz https://abc.xyz");
user_pref("capability.policy.nohrefs.HTMLAnchorElement.href", "noAccess");

I check it in "about:config" and see it show but it's didn't work in fact at anytime.
How to make it work ?

Reference links:

Upvotes: 1

Views: 249

Answers (1)

Miguel Ortiz
Miguel Ortiz

Reputation: 1482

In case someone is still looking for an answer, the capability.policy.nojsbroken.javascript.enabled is gone since Firefox 29, please refeer to this answer.

Upvotes: 0

Related Questions