forked from mozilla/web-ext
-
Notifications
You must be signed in to change notification settings - Fork 1
/
preferences.js
92 lines (76 loc) · 3.07 KB
/
preferences.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/* @flow */
import {WebExtError} from '../errors';
export function getPrefs(app: string = 'firefox'): Object {
let appPrefs = prefs[app];
if (!appPrefs) {
throw new WebExtError(`Unsupported application: ${app}`);
}
return {
...prefs.common,
...appPrefs,
};
}
var prefs = {};
prefs.common = {
// Allow debug output via dump to be printed to the system console
'browser.dom.window.dump.enabled': true,
// Warn about possibly incorrect code.
'javascript.options.strict': true,
'javascript.options.showInConsole': true,
// Allow remote connections to the debugger.
'devtools.debugger.remote-enabled' : true,
// Disable the prompt for allowing connections.
'devtools.debugger.prompt-connection' : false,
// Turn off platform logging because it is a lot of info.
'extensions.logging.enabled': false,
// Disable extension updates and notifications.
'extensions.checkCompatibility.nightly' : false,
'extensions.update.enabled' : false,
'extensions.update.notifyUser' : false,
// From:
// http://hg.mozilla.org/mozilla-central/file/1dd81c324ac7/build/automation.py.in//l372
// Only load extensions from the application and user profile.
// AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_APPLICATION
'extensions.enabledScopes' : 5,
// Disable metadata caching for installed add-ons by default.
'extensions.getAddons.cache.enabled' : false,
// Disable intalling any distribution add-ons.
'extensions.installDistroAddons' : false,
// Allow installing extensions dropped into the profile folder.
'extensions.autoDisableScopes' : 10,
// Disable app update.
'app.update.enabled' : false,
// Point update checks to a nonexistent local URL for fast failures.
'extensions.update.url': 'http://localhost/extensions-dummy/updateURL',
'extensions.blocklist.url':
'http://localhost/extensions-dummy/blocklistURL',
// Make sure opening about:addons won't hit the network.
'extensions.webservice.discoverURL' :
'http://localhost/extensions-dummy/discoveryURL',
// Allow unsigned add-ons.
'xpinstall.signatures.required' : false,
};
// Prefs specific to Firefox for Android.
prefs.fennec = {
'browser.console.showInPanel': true,
'browser.firstrun.show.uidiscovery': false,
};
// Prefs specific to Firefox for desktop.
prefs.firefox = {
'browser.startup.homepage' : 'about:blank',
'startup.homepage_welcome_url' : 'about:blank',
'startup.homepage_welcome_url.additional' : '',
'devtools.errorconsole.enabled' : true,
'devtools.chrome.enabled' : true,
// From:
// http://hg.mozilla.org/mozilla-central/file/1dd81c324ac7/build/automation.py.in//l388
// Make url-classifier updates so rare that they won't affect tests.
'urlclassifier.updateinterval' : 172800,
// Point the url-classifier to a nonexistent local URL for fast failures.
'browser.safebrowsing.provider.0.gethashURL' :
'http://localhost/safebrowsing-dummy/gethash',
'browser.safebrowsing.provider.0.keyURL' :
'http://localhost/safebrowsing-dummy/newkey',
'browser.safebrowsing.provider.0.updateURL' :
'http://localhost/safebrowsing-dummy/update',
};