Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-present eyeo GmbH | 3 * Copyright (C) 2006-present eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
148 | 148 |
149 /** | 149 /** |
150 * Whether notification opt-out UI should be shown. | 150 * Whether notification opt-out UI should be shown. |
151 * @type {boolean} | 151 * @type {boolean} |
152 */ | 152 */ |
153 defaults.notifications_showui = false; | 153 defaults.notifications_showui = false; |
154 | 154 |
155 /** | 155 /** |
156 * Whether to show tracking warning in options page when both | 156 * Whether to show tracking warning in options page when both |
157 * Acceptable Ads and subscription of type "Privacy" are enabled. | 157 * Acceptable Ads and subscription of type "Privacy" are enabled. |
158 * | 158 * |
kzar
2018/01/15 11:58:35
Could you do me a favour and delete the trailing w
Thomas Greiner
2018/01/17 18:00:06
Done.
| |
159 * @type {boolean} | 159 * @type {boolean} |
160 */ | 160 */ |
161 defaults.ui_warn_tracking = true; | 161 defaults.ui_warn_tracking = true; |
162 | 162 |
163 /** | 163 /** |
164 * Determines whether data has been cleaned up after upgrading from the legacy | 164 * Determines whether data has been cleaned up after upgrading from the legacy |
165 * extension on Firefox. | 165 * extension on Firefox. |
166 * | 166 * |
167 * @type {boolean} | 167 * @type {boolean} |
168 */ | 168 */ |
169 defaults.data_cleanup_done = false; | 169 defaults.data_cleanup_done = false; |
170 | 170 |
171 /** | 171 /** |
172 * Notification categories to be ignored. | 172 * Notification categories to be ignored. |
173 * | 173 * |
174 * @type {string[]} | 174 * @type {string[]} |
175 */ | 175 */ |
176 defaults.notifications_ignoredcategories = []; | 176 defaults.notifications_ignoredcategories = []; |
177 | 177 |
178 /** | 178 /** |
179 * Whether to show the developer tools panel. | 179 * Whether to show the developer tools panel. |
180 * | 180 * |
181 * @type {boolean} | 181 * @type {boolean} |
182 */ | 182 */ |
183 defaults.show_devtools_panel = true; | 183 defaults.show_devtools_panel = true; |
184 | 184 |
185 /** | 185 /** |
186 * Whether to suppress the first run page. This preference isn't | 186 * Whether to suppress the first run page. This preference isn't |
kzar
2018/01/15 11:58:35
Mind updating this comment since the preference al
Thomas Greiner
2018/01/17 18:00:05
Done. Good point.
Posted it as a comment in the t
| |
187 * set by the extension but can be pre-configured externally. | 187 * set by the extension but can be pre-configured externally. |
188 * | 188 * |
189 * @see https://adblockplus.org/development-builds/suppressing-the-first-run-pag e-on-chrome | 189 * @see https://adblockplus.org/development-builds/suppressing-the-first-run-pag e-on-chrome |
190 * @type {boolean} | 190 * @type {boolean} |
191 */ | 191 */ |
192 defaults.suppress_first_run_page = false; | 192 defaults.suppress_first_run_page = false; |
193 | 193 |
194 /** | 194 /** |
195 * Additonal subscriptions to be automatically added when the extension is | 195 * Additonal subscriptions to be automatically added when the extension is |
196 * loaded. This preference isn't set by the extension but can be pre-configured | 196 * loaded. This preference isn't set by the extension but can be pre-configured |
197 * externally. | 197 * externally. |
198 * | 198 * |
199 * @type {string[]} | 199 * @type {string[]} |
200 */ | 200 */ |
201 defaults.additional_subscriptions = []; | 201 defaults.additional_subscriptions = []; |
202 | 202 |
203 /** | 203 /** |
204 * The version of major updates that the user is aware of. If it's too low, | |
Thomas Greiner
2018/01/12 16:33:39
I'm aware that "version of major updates" might so
kzar
2018/01/15 11:58:35
How about something like this? "With some major re
Thomas Greiner
2018/01/17 18:00:05
Problem is it doesn't reflect the "most recent ver
| |
205 * the updates page will be shown to inform the user about intermediate changes. | |
206 * | |
207 * @type {number} | |
208 */ | |
209 defaults.lastUpdatesVersion = 0; | |
kzar
2018/01/15 11:58:35
Other preferences names seem to mostly use snake c
kzar
2018/01/15 11:58:35
I guess the default value should be "0.0.0" with m
Thomas Greiner
2018/01/17 18:00:06
It'd be great if we could make those consistent in
Thomas Greiner
2018/01/17 18:00:06
Yep, it would need to be. Let's come back to this
| |
210 | |
211 /** | |
204 * @namespace | 212 * @namespace |
205 * @static | 213 * @static |
206 */ | 214 */ |
207 let Prefs = exports.Prefs = { | 215 let Prefs = exports.Prefs = { |
208 /** | 216 /** |
209 * Adds a callback that is called when the | 217 * Adds a callback that is called when the |
210 * value of a specified preference changed. | 218 * value of a specified preference changed. |
211 * | 219 * |
212 * @param {string} preference | 220 * @param {string} preference |
213 * @param {function} callback | 221 * @param {function} callback |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
372 eventEmitter.emit(pref); | 380 eventEmitter.emit(pref); |
373 } | 381 } |
374 } | 382 } |
375 }); | 383 }); |
376 } | 384 } |
377 | 385 |
378 Prefs.untilLoaded = Promise.all([localLoaded, managedLoaded]).then(onLoaded); | 386 Prefs.untilLoaded = Promise.all([localLoaded, managedLoaded]).then(onLoaded); |
379 } | 387 } |
380 | 388 |
381 init(); | 389 init(); |
OLD | NEW |