2017-11-07 00:36:44 +01:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
(function(){
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var settingDefinitions = [
|
|
|
|
{
|
|
|
|
name: "logLevel",
|
|
|
|
defaultValue: 1,
|
|
|
|
options: [0, 1, 25, 50, 75, 100]
|
|
|
|
},
|
2017-12-03 23:47:49 +01:00
|
|
|
{
|
|
|
|
name: "urlSettings",
|
|
|
|
defaultValue: [],
|
|
|
|
urlContainer: true,
|
|
|
|
entries: [
|
|
|
|
{name: "url", defaultValue: ""}
|
|
|
|
]
|
|
|
|
},
|
2018-07-02 00:29:41 +02:00
|
|
|
{
|
|
|
|
name: "hiddenSettings",
|
|
|
|
hideContainer: true,
|
|
|
|
defaultValue: {}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "displayHiddenSettings",
|
|
|
|
defaultValue: false
|
|
|
|
},
|
2017-12-03 23:47:49 +01:00
|
|
|
{
|
|
|
|
name: "urls",
|
|
|
|
defaultValue: [],
|
|
|
|
dynamic: true,
|
|
|
|
dependencies: ["urlSettings"],
|
|
|
|
getter: function(settings){
|
|
|
|
return settings.urlSettings.map(function(urlSetting){
|
|
|
|
return urlSetting.url;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
2017-11-07 00:36:44 +01:00
|
|
|
{
|
|
|
|
name: "whiteList",
|
|
|
|
defaultValue: ""
|
|
|
|
},
|
2018-07-17 13:07:50 +02:00
|
|
|
{
|
|
|
|
name: "sessionWhiteList",
|
|
|
|
resetOnStartup: true,
|
|
|
|
defaultValue: ""
|
|
|
|
},
|
2017-11-07 00:36:44 +01:00
|
|
|
{
|
|
|
|
name: "blackList",
|
|
|
|
defaultValue: ""
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "blockMode",
|
|
|
|
defaultValue: "fakeReadout",
|
2017-12-03 23:47:49 +01:00
|
|
|
urlSpecific: true,
|
2017-11-07 00:36:44 +01:00
|
|
|
options: [
|
|
|
|
"blockReadout", "fakeReadout", "fakeInput", "askReadout", null,
|
|
|
|
"blockEverything", "block", "ask", "allow", "allowEverything"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "minFakeSize",
|
|
|
|
defaultValue: 1
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "maxFakeSize",
|
|
|
|
defaultValue: 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "rng",
|
|
|
|
defaultValue: "nonPersistent",
|
2017-11-24 17:06:43 +01:00
|
|
|
options: ["white", "nonPersistent", "constant", "persistent"]
|
2017-11-07 00:36:44 +01:00
|
|
|
},
|
2018-05-26 15:33:39 +02:00
|
|
|
{
|
|
|
|
name: "apiWhiteList",
|
|
|
|
defaultValue: {},
|
|
|
|
keys: [
|
2018-06-21 00:07:29 +02:00
|
|
|
{name: "Canvas-API", level: 1},
|
2018-05-26 15:33:39 +02:00
|
|
|
"getContext",
|
2018-06-21 00:07:29 +02:00
|
|
|
{message: "readout", level: 2},
|
2018-05-26 15:33:39 +02:00
|
|
|
"toDataURL", "toBlob", "mozGetAsFile", "getImageData",
|
|
|
|
"isPointInPath", "isPointInStroke",
|
2018-06-21 00:07:29 +02:00
|
|
|
{message: "input", level: 2},
|
2018-05-26 15:33:39 +02:00
|
|
|
"fillText", "strokeText",
|
2018-06-21 00:07:29 +02:00
|
|
|
{name: "webGL", level: 2},
|
2018-06-16 00:22:31 +02:00
|
|
|
"readPixels",
|
2018-06-21 00:07:29 +02:00
|
|
|
{name: "Audio-API", leve: 1},
|
2018-06-16 00:22:31 +02:00
|
|
|
"getFloatFrequencyData", "getByteFrequencyData", "getFloatTimeDomainData", "getByteTimeDomainData",
|
|
|
|
"getChannelData", "copyFromChannel",
|
|
|
|
"getFrequencyResponse"
|
2018-05-26 15:33:39 +02:00
|
|
|
],
|
|
|
|
defaultKeyValue: false
|
|
|
|
},
|
2017-11-07 00:36:44 +01:00
|
|
|
{
|
|
|
|
name: "useCanvasCache",
|
|
|
|
defaultValue: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "ignoreFrequentColors",
|
|
|
|
defaultValue: 0
|
|
|
|
},
|
2017-12-11 12:47:43 +01:00
|
|
|
{
|
|
|
|
name: "minColors",
|
|
|
|
defaultValue: 0
|
|
|
|
},
|
2017-11-07 00:36:44 +01:00
|
|
|
{
|
|
|
|
name: "fakeAlphaChannel",
|
|
|
|
defaultValue: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "persistentRndStorage",
|
|
|
|
defaultValue: ""
|
|
|
|
},
|
2018-07-28 14:13:14 +02:00
|
|
|
{
|
|
|
|
name: "persistentIncognitoRndStorage",
|
|
|
|
resetOnStartup: true,
|
|
|
|
defaultValue: ""
|
|
|
|
},
|
2017-11-07 00:36:44 +01:00
|
|
|
{
|
|
|
|
name: "storePersistentRnd",
|
|
|
|
defaultValue: false
|
|
|
|
},
|
2017-11-08 17:46:41 +01:00
|
|
|
{
|
|
|
|
name: "persistentRndClearIntervalValue",
|
|
|
|
defaultValue: 0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "persistentRndClearIntervalUnit",
|
|
|
|
defaultValue: "days",
|
|
|
|
options: ["seconds", "minutes", "hours", "days", "weeks", "months", "years"]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "lastPersistentRndClearing",
|
|
|
|
defaultValue: 0
|
|
|
|
},
|
2017-11-07 00:36:44 +01:00
|
|
|
{
|
|
|
|
name: "askOnlyOnce",
|
2017-11-10 23:45:09 +01:00
|
|
|
defaultValue: "individual",
|
|
|
|
options: ["no", "individual", "combined"]
|
2017-11-07 00:36:44 +01:00
|
|
|
},
|
2017-11-09 00:53:52 +01:00
|
|
|
{
|
|
|
|
name: "askDenyMode",
|
|
|
|
defaultValue: "block",
|
|
|
|
options: ["block", "fake"]
|
|
|
|
},
|
2018-01-04 13:36:18 +01:00
|
|
|
{
|
|
|
|
name: "showCanvasWhileAsking",
|
|
|
|
defaultValue: true
|
|
|
|
},
|
2017-11-07 00:36:44 +01:00
|
|
|
{
|
|
|
|
name: "showNotifications",
|
2017-12-03 23:47:49 +01:00
|
|
|
defaultValue: true,
|
|
|
|
urlSpecific: true
|
2017-11-07 00:36:44 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "storeImageForInspection",
|
|
|
|
defaultValue: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "notificationDisplayTime",
|
|
|
|
defaultValue: 30
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "ignoreList",
|
|
|
|
defaultValue: ""
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "showCallingFile",
|
|
|
|
defaultValue: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "showCompleteCallingStack",
|
|
|
|
defaultValue: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "enableStackList",
|
|
|
|
defaultValue: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "stackList",
|
|
|
|
defaultValue: ""
|
|
|
|
},
|
2018-06-16 00:22:31 +02:00
|
|
|
{
|
|
|
|
name: "protectAudio",
|
|
|
|
defaultValue: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "audioFakeRate",
|
2018-06-30 23:34:59 +02:00
|
|
|
defaultValue: "100",
|
2018-07-04 23:59:27 +02:00
|
|
|
options: ["1", "10", "100", "1000", "0.1%", "1%", "10%", "100%"]
|
2018-06-16 00:22:31 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "audioNoiseLevel",
|
2018-06-21 00:20:41 +02:00
|
|
|
defaultValue: "minimal",
|
2018-06-16 00:22:31 +02:00
|
|
|
options: ["minimal", "low", "medium", "high", "maximal"]
|
|
|
|
},
|
2018-06-30 00:34:20 +02:00
|
|
|
{
|
|
|
|
name: "useAudioCache",
|
|
|
|
defaultValue: true
|
|
|
|
},
|
2018-06-21 00:19:49 +02:00
|
|
|
{
|
|
|
|
name: "audioUseFixedIndices",
|
|
|
|
defaultValue: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "audioFixedIndices",
|
|
|
|
defaultValue: function(){
|
|
|
|
return Math.floor(Math.random() * 30).toString(10);
|
|
|
|
}
|
|
|
|
},
|
2018-07-16 00:14:44 +02:00
|
|
|
{
|
2018-07-21 00:32:15 +02:00
|
|
|
name: "blockDataURLs",
|
2018-07-16 00:14:44 +02:00
|
|
|
defaultValue: true
|
|
|
|
},
|
2017-11-07 00:36:44 +01:00
|
|
|
{
|
|
|
|
name: "displayAdvancedSettings",
|
|
|
|
defaultValue: false
|
|
|
|
},
|
2017-11-11 23:34:59 +01:00
|
|
|
{
|
|
|
|
name: "displayDescriptions",
|
|
|
|
defaultValue: false
|
|
|
|
},
|
2018-08-19 00:13:43 +02:00
|
|
|
{
|
|
|
|
name: "dontShowOptionsOnUpdate",
|
|
|
|
defaultValue: false
|
|
|
|
},
|
2017-11-07 00:36:44 +01:00
|
|
|
{
|
|
|
|
name: "isStillDefault",
|
|
|
|
defaultValue: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "storageVersion",
|
2017-12-08 20:25:08 +01:00
|
|
|
defaultValue: 0.3,
|
2017-11-10 23:45:09 +01:00
|
|
|
fixed: true
|
2017-11-07 00:36:44 +01:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
if ((typeof module) !== "undefined"){
|
|
|
|
module.exports = settingDefinitions;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
window.scope.settingDefinitions = settingDefinitions;
|
|
|
|
}
|
|
|
|
}());
|