-
Notifications
You must be signed in to change notification settings - Fork 13
/
defaults.js
65 lines (52 loc) · 1.77 KB
/
defaults.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
/**
* @typedef {Object} SearchModuleSettings
* @property {'filter'|'rewrite'|'none'|'disarm'} mode
*/
/**
* @typedef {Object} ExtensionSettings
* @property {number} version
* @property {false|banner|true} isRedirectDisabled Whether Fandom sites should be redirected.
* @property {string[]} disabledWikis List of disabled wikis, by ID.
* @property {boolean} useTabRedirect Whether legacy redirection method should be used. Not implemented.
* @property {Record<string, SearchModuleSettings>} sfs Search filtering settings, per module.
* @property {'none'|'filter'|'rewrite'} searchMode [DEPRECATED] Search integration behaviour choice.
* @property {boolean} ddgEnable [DEPRECATED] Whether DuckDuckGo search integration should be enabled.
*/
/**
* Returns default extension settings.
*
* @return {ExtensionSettings}
*/
function createFreshSet() {
return {
version: 0,
isRedirectDisabled: false,
disabledWikis: [],
// Developer settings - subject to change
useTabRedirect: true,
useRuntimeLists: false,
rtListLastSyncTime: 0,
ffUseOptimisedSearchCore: false,
// Legacy search engine settings - this should be migrated and dropped in 1.7.0
searchMode: 'rewrite',
ddgEnable: true,
// Search filtering settings - this should match SearchFilterSettings.engines
sfs: {
google: {
mode: 'rewrite'
},
ddg: {
mode: 'rewrite'
}
},
// Runtime sites list
rtList: {
version: 0,
data: null,
hasAutoSyncConsent: false,
lastSyncTime: 0
}
};
}
createFreshSet.SHARED = Object.freeze( createFreshSet() );
export default createFreshSet;