| 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-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 26 matching lines...) Expand all Loading... | |
| 37 } | 37 } |
| 38 | 38 |
| 39 function restoreFilterComponents() | 39 function restoreFilterComponents() |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 function preparePrefs() | 43 function preparePrefs() |
| 44 { | 44 { |
| 45 this._pbackup = Object.create(null); | 45 this._pbackup = Object.create(null); |
| 46 for (var pref in Prefs) | 46 for (var pref in Prefs) |
| 47 if (Prefs.__lookupSetter__(pref)) | 47 { |
| 48 if (pref != "addListener" && pref != "removeListener") | |
|
Wladimir Palant
2015/03/02 19:17:17
I generally try to avoid lists that have to by kep
Sebastian Noack
2015/03/02 19:28:09
IMO, checking for a dynamic getter was a footgun.
| |
| 48 this._pbackup[pref] = Prefs[pref]; | 49 this._pbackup[pref] = Prefs[pref]; |
| 50 } | |
| 49 Prefs.enabled = true; | 51 Prefs.enabled = true; |
| 50 } | 52 } |
| 51 | 53 |
| 52 function restorePrefs() | 54 function restorePrefs() |
| 53 { | 55 { |
| 54 for (var pref in this._pbackup) | 56 for (var pref in this._pbackup) |
| 55 Prefs[pref] = this._pbackup[pref]; | 57 Prefs[pref] = this._pbackup[pref]; |
| 56 } | 58 } |
| 57 | 59 |
| 58 function executeFirstRunActions() | 60 function executeFirstRunActions() |
| 59 { | 61 { |
| 60 } | 62 } |
| OLD | NEW |