~ / archivo / stackoverflow / 36759463
Firefox - Set capability not working
StackOverflow
· firefox, config, capability
· ayudé
-
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: -
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.