Microsoft is acquiring GitHub. Decentraleyes is leaving GitHub. Welcome to its new home!

To participate, please register, or sign in with an existing GitLab.com, Bitbucket, or GitHub account.

Past contributions on GitHub? Be sure to reclaim your Comments, Issues, and Pull Requests.

Commit 2d6acb36 authored by Thomas Rientjes's avatar Thomas Rientjes

Refactor security preferences module

parent e8a90e2c
/**
* NSA Policy model.
*/
class NsaPolicy {
/**
* Creates an NSA Policy.
*/
constructor () {
this.UNTRUSTED = {};
this.TRUSTED = {
'js': true,
'webgl': true,
'java': true,
'flash': true,
'silverlight': true,
'plugin': true,
'media': true,
'frame': true,
'font': true
};
this.DEFAULT = {
'frame': true
};
this['mozilla.org'] = 1;
this['mozilla.com'] = 1;
this['mozilla.net'] = 1;
this['google.com'] = 1;
this['gstatic.com'] = 1;
this['googleapis.com'] = 1;
this['yahoo.com'] = 1;
this['yimg.com'] = 1;
this['yahooapis.com'] = 1;
this['hotmail.com'] = 1;
this['live.com'] = 1;
this['wlxrs.com'] = 1;
this['securecode.com'] = 1;
this['recaptcha.net'] = 1;
this['noscript.net'] = 1;
this['flashgot.net'] = 1;
this['informaction.com'] = 1;
this['youtube.com'] = 1;
this['ytimg.com'] = 1;
}
};
exports.NsaPolicy = NsaPolicy;
This diff is collapsed.
......@@ -30,7 +30,7 @@ var sdkPreferences = require('sdk/preferences/service');
/**
* Bind a change handler to a specific preference domain.
*/
exports.bindChangeHandlerToPreference = function (domain, handler, initialize = false) {
exports.addObserverToPreference = function (domain, handler, initialize = false) {
let updatePreference, observer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment