| LEFT | RIGHT |
| 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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 12 matching lines...) Expand all Loading... |
| 23 let defaults = Object.create(null); | 23 let defaults = Object.create(null); |
| 24 let overrides = Object.create(null); | 24 let overrides = Object.create(null); |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * Only for compatibility with core code. Please do not change! | 27 * Only for compatibility with core code. Please do not change! |
| 28 * | 28 * |
| 29 * @type {boolean} | 29 * @type {boolean} |
| 30 */ | 30 */ |
| 31 defaults.enabled = true; | 31 defaults.enabled = true; |
| 32 /** | 32 /** |
| 33 * The application version as set during intilization. Used to detect updates. | 33 * The application version as set during initialization. Used to detect updates. |
| 34 * | 34 * |
| 35 * @type {string} | 35 * @type {string} |
| 36 */ | 36 */ |
| 37 defaults.currentVersion = ""; | 37 defaults.currentVersion = ""; |
| 38 /** | 38 /** |
| 39 * Only for compatibility with core code. Please do not change! | 39 * Only for compatibility with core code. Please do not change! |
| 40 * | 40 * |
| 41 * @type {string} | 41 * @type {string} |
| 42 */ | 42 */ |
| 43 defaults.data_directory = ""; | 43 defaults.data_directory = ""; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 /** | 131 /** |
| 132 * Whether to collapse placeholders for blocked elements. | 132 * Whether to collapse placeholders for blocked elements. |
| 133 * | 133 * |
| 134 * @type {boolean} | 134 * @type {boolean} |
| 135 */ | 135 */ |
| 136 defaults.hidePlaceholders = true; | 136 defaults.hidePlaceholders = true; |
| 137 /** | 137 /** |
| 138 * Whether to suppress the first run page. This preference isn't | 138 * Whether to suppress the first run page. This preference isn't |
| 139 * set by the extension but can be pre-configured externally. | 139 * set by the extension but can be pre-configured externally. |
| 140 * | 140 * |
| 141 * @see https://adblockplus.org/development-builds/suppressing-the-first-run-pag
e-on-chrome |
| 141 * @type {boolean} | 142 * @type {boolean} |
| 142 */ | 143 */ |
| 143 defaults.suppress_first_run_page = false; | 144 defaults.suppress_first_run_page = false; |
| 144 | 145 |
| 145 /** | 146 /** |
| 146 * @namespace | 147 * @namespace |
| 147 * @static | 148 * @static |
| 148 */ | 149 */ |
| 149 let Prefs = exports.Prefs = { | 150 let Prefs = exports.Prefs = { |
| 150 /** | 151 /** |
| 151 * Fired when the value of a preference changes. | 152 * Fired when the value of a preference changes. |
| 152 * | 153 * |
| 153 * @event | 154 * @event |
| 154 * @property {string} pref The name of the preference that changed. | 155 * @property {string} pref The name of the preference that changed. |
| 155 */ | 156 */ |
| 156 onChanged: new ext._EventTarget(), | 157 onChanged: new ext._EventTarget(), |
| 157 | 158 |
| 158 /** | 159 /** |
| 159 * Fired when all preferences have been loaded. You must wait for | 160 * Fired when all preferences have been loaded. You must wait for |
| 160 * this event before using preferences during extension intilization. | 161 * this event before using preferences during extension initialization. |
| 161 * | 162 * |
| 162 * @event | 163 * @event |
| 163 */ | 164 */ |
| 164 onLoaded: new ext._EventTarget() | 165 onLoaded: new ext._EventTarget() |
| 165 }; | 166 }; |
| 166 | 167 |
| 167 function keyToPref(key) | 168 function keyToPref(key) |
| 168 { | 169 { |
| 169 if (key.indexOf(keyPrefix) != 0) | 170 if (key.indexOf(keyPrefix) != 0) |
| 170 return null; | 171 return null; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 }); | 291 }); |
| 291 } | 292 } |
| 292 else | 293 else |
| 293 { | 294 { |
| 294 managedLoaded = true; | 295 managedLoaded = true; |
| 295 checkLoaded(); | 296 checkLoaded(); |
| 296 } | 297 } |
| 297 } | 298 } |
| 298 | 299 |
| 299 init(); | 300 init(); |
| LEFT | RIGHT |