Left: | ||
Right: |
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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 */ | 176 */ |
177 defaults.additional_subscriptions = []; | 177 defaults.additional_subscriptions = []; |
178 | 178 |
179 /** | 179 /** |
180 * @namespace | 180 * @namespace |
181 * @static | 181 * @static |
182 */ | 182 */ |
183 let Prefs = exports.Prefs = { | 183 let Prefs = exports.Prefs = { |
184 /** | 184 /** |
185 * Adds a callback that is called when the | 185 * Adds a callback that is called when the |
186 * value of the specified preference changed. | 186 * value of a specified preference changed. |
kzar
2016/03/18 15:49:59
Nit: Should be "a specified"
Sebastian Noack
2016/03/18 18:15:49
Done.
| |
187 * | 187 * |
188 * @param {string} preference | 188 * @param {string} preference |
189 * @param {function} callback | 189 * @param {function} callback |
190 */ | 190 */ |
191 on: function(preference, callback) | 191 on: function(preference, callback) |
192 { | 192 { |
193 eventEmitter.on(preference, callback); | 193 eventEmitter.on(preference, callback); |
194 }, | 194 }, |
195 | 195 |
196 /** | 196 /** |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
312 eventEmitter.emit(pref); | 312 eventEmitter.emit(pref); |
313 } | 313 } |
314 } | 314 } |
315 }); | 315 }); |
316 } | 316 } |
317 | 317 |
318 Prefs.untilLoaded = Promise.all([localLoaded, managedLoaded]).then(onLoaded); | 318 Prefs.untilLoaded = Promise.all([localLoaded, managedLoaded]).then(onLoaded); |
319 } | 319 } |
320 | 320 |
321 init(); | 321 init(); |
LEFT | RIGHT |