blob: 17e9056468b7441a0de27fb3d447eaa7f524c23a [file] [log] [blame]
Adrià Vilanova Martíneza2ede8c2024-04-21 16:43:01 +02001interface BaseOptionConfig {
2 context: "options" | "experiments" | "internal" | "deprecated";
3}
4export type OptionConfig = BaseOptionConfig &
5 (
6 | {
7 defaultValue: any;
8 killSwitchType:
9 | "option"
10 | "experiment"
11 | "ignore"
12 | "deprecated";
13 }
14 | {
15 killSwitchType: "internalKillSwitch";
16 }
17 );
18export type OptionsPrototype = Record<string, OptionConfig>;
19
20export const optionsPrototype: OptionsPrototype = {
21 // Available options:
22 list: {
23 defaultValue: true,
24 context: "options",
25 killSwitchType: "option",
26 },
27 thread: {
28 defaultValue: false,
29 context: "options",
30 killSwitchType: "option",
31 },
32 threadall: {
33 defaultValue: true,
34 context: "options",
35 killSwitchType: "option",
36 },
37 fixedtoolbar: {
38 defaultValue: false,
39 context: "options",
40 killSwitchType: "option",
41 },
42 redirect: {
43 defaultValue: false,
44 context: "options",
45 killSwitchType: "option",
46 },
47 history: {
48 defaultValue: false,
49 context: "options",
50 killSwitchType: "option",
51 },
Adrià Vilanova Martíneza2ede8c2024-04-21 16:43:01 +020052 increasecontrast: {
53 defaultValue: false,
54 context: "options",
55 killSwitchType: "option",
56 },
57 stickysidebarheaders: {
58 defaultValue: false,
59 context: "options",
60 killSwitchType: "option",
61 },
62 profileindicator: {
63 defaultValue: false,
64 context: "options",
65 killSwitchType: "option",
66 },
67 profileindicatoralt: {
68 defaultValue: false,
69 context: "options",
70 killSwitchType: "option",
71 },
72 profileindicatoralt_months: {
73 defaultValue: 12,
74 context: "options",
75 killSwitchType: "ignore",
76 },
77 ccdarktheme: {
78 defaultValue: false,
79 context: "options",
80 killSwitchType: "option",
81 },
82 ccdarktheme_mode: {
83 defaultValue: "switch",
84 context: "options",
85 killSwitchType: "ignore",
86 },
87 ccforcehidedrawer: {
88 defaultValue: false,
89 context: "options",
90 killSwitchType: "option",
91 },
92 // #!if ['chromium', 'chromium_mv3'].includes(browser_target)
93 ccdragndropfix: {
94 defaultValue: false,
95 context: "options",
96 killSwitchType: "option",
97 },
98 // #!endif
99 batchlock: {
100 defaultValue: false,
101 context: "options",
102 killSwitchType: "option",
103 },
104 enhancedannouncementsdot: {
105 defaultValue: false,
106 context: "options",
107 killSwitchType: "option",
108 },
109 repositionexpandthread: {
110 defaultValue: false,
111 context: "options",
112 killSwitchType: "option",
113 },
114 threadlistavatars: {
115 defaultValue: false,
116 context: "options",
117 killSwitchType: "option",
118 },
119 autorefreshlist: {
120 defaultValue: false,
121 context: "options",
122 killSwitchType: "option",
123 },
124 imagemaxheight: {
125 defaultValue: false,
126 context: "options",
127 killSwitchType: "option",
128 },
Adrià Vilanova Martíneza2ede8c2024-04-21 16:43:01 +0200129 perforumstats: {
130 defaultValue: false,
131 context: "options",
132 killSwitchType: "option",
133 },
Adrià Vilanova Martíneza2ede8c2024-04-21 16:43:01 +0200134 uispacing: {
135 defaultValue: false,
136 context: "options",
137 killSwitchType: "option",
138 },
139 flattenthreads: {
140 defaultValue: false,
141 context: "options",
142 killSwitchType: "option",
143 },
Adrià Vilanova Martínez66dba7c2024-05-15 22:38:20 +0200144 fixpekb269560789: {
145 defaultValue: true,
146 context: "options",
147 killSwitchType: "option",
148 },
Adrià Vilanova Martíneza2ede8c2024-04-21 16:43:01 +0200149
150 // Experiments:
151 workflows: {
152 defaultValue: false,
153 context: "experiments",
154 killSwitchType: "experiment",
155 },
156 extrainfo: {
157 defaultValue: false,
158 context: "experiments",
159 killSwitchType: "experiment",
160 },
Adrià Vilanova Martíneza2ede8c2024-04-21 16:43:01 +0200161
162 // Internal options:
163 ccdarktheme_switch_enabled: {
164 defaultValue: true,
165 context: "internal",
166 killSwitchType: "ignore",
167 },
168 flattenthreads_switch_enabled: {
169 defaultValue: true,
170 context: "internal",
171 killSwitchType: "ignore",
172 },
173
174 // Internal kill switches:
175 killswitch_xhrproxy: {
176 context: "internal",
177 killSwitchType: "internalKillSwitch",
178 },
179
180 // Deprecated options:
181 escalatethreads: {
182 defaultValue: false,
183 context: "deprecated",
184 killSwitchType: "deprecated",
185 },
186 movethreads: {
187 defaultValue: false,
188 context: "deprecated",
189 killSwitchType: "deprecated",
190 },
191 batchduplicate: {
192 defaultValue: false,
193 context: "deprecated",
194 killSwitchType: "deprecated",
195 },
196 smei_sortdirection: {
197 defaultValue: false,
198 context: "deprecated",
199 killSwitchType: "deprecated",
200 },
201 forcemarkasread: {
202 defaultValue: false,
203 context: "deprecated",
204 killSwitchType: "deprecated",
205 },
206 disableunifiedprofiles: {
207 defaultValue: false,
208 context: "deprecated",
209 killSwitchType: "deprecated",
210 },
Adrià Vilanova Martínez8423dfd2024-05-16 22:15:55 +0200211 nestedreplies: {
212 defaultValue: false,
213 context: "deprecated",
214 killSwitchType: "deprecated",
215 },
Adrià Vilanova Martínez879d44a2024-05-17 15:30:03 +0200216 loaddrafts: {
217 defaultValue: false,
218 context: "deprecated",
219 killSwitchType: "deprecated",
220 },
221 // #!if ['chromium', 'chromium_mv3'].includes(browser_target)
222 blockdrafts: {
223 defaultValue: false,
224 context: "deprecated",
225 killSwitchType: "deprecated",
226 },
227 // #!endif
228 interopthreadpage: {
229 defaultValue: false,
230 context: "deprecated",
231 killSwitchType: "deprecated",
232 },
233 interopthreadpage_mode: {
234 defaultValue: "previous",
235 context: "deprecated",
236 killSwitchType: "ignore",
237 },
Adrià Vilanova Martíneza2ede8c2024-04-21 16:43:01 +0200238};