于 2014/4/15 星期二 1:57, Bobby Holley 写道:
On Mon, Apr 14, 2014 at 10:38 AM, xunxun <xunxun1...@gmail.com <mailto:xunxun1...@gmail.com>> wrote:,

        I noticed that Domain Policy in CAPS has been removed in
    https://bugzilla.mozilla.org/show_bug.cgi?id=913734, which means,
    we can't use the config capability.policy after 29.0


Correct.

        Is there any easy way to replace it (about:config)? ( Except
    installing NoScript )


What are you trying to do?
I want to use a configurable way like https://developer.mozilla.org/en-US/docs/Midas/Security_preferences, which can solve some strange issues on a single js, NoScript is too big for the problem.

For example, I use the policy by default on my custom build:

|pref("capability.policy.policynames", "pcxnojs");|
|pref("capability.policy.pcxnojs.sites", "http://nsclick.baidu.com";);|
|pref("capability.policy.pcxnojs.javascript.enabled", "noAccess");|

|nsclick.baidu.com <http://nsclick.baidu.com> |can cause firefox tab closing costs too much time, so I use the policy to avoid it.

If you're trying to block script from running, there's a new API (introduced in bug 840488, and currently used by NoScript).

If you're trying to grant extra privileges to certain web pages, you should write a custom add-on with a page-mod content script. See the suggestion here: https://bugzilla.mozilla.org/show_bug.cgi?id=995943#c5

bholley


--
Best Regards,
xunxun
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to