| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the Adblock Plus extension, | 2 * This file is part of the Adblock Plus extension, |
| 3 * Copyright (C) 2006-2012 Eyeo GmbH | 3 * Copyright (C) 2006-2012 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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 require("matcher").init(); | 18 var matcher = require("matcher"); |
| 19 matcher.init(); |
| 20 |
| 19 with(require("filterClasses")) | 21 with(require("filterClasses")) |
| 20 { | 22 { |
| 21 this.Filter = Filter; | 23 this.Filter = Filter; |
| 22 this.WhitelistFilter = WhitelistFilter; | 24 this.WhitelistFilter = WhitelistFilter; |
| 23 } | 25 } |
| 24 with(require("subscriptionClasses")) | 26 with(require("subscriptionClasses")) |
| 25 { | 27 { |
| 26 this.Subscription = Subscription; | 28 this.Subscription = Subscription; |
| 27 this.DownloadableSubscription = DownloadableSubscription; | 29 this.DownloadableSubscription = DownloadableSubscription; |
| 28 } | 30 } |
| 29 var FilterNotifier = require("filterNotifier").FilterNotifier; | 31 var FilterNotifier = require("filterNotifier").FilterNotifier; |
| 30 var FilterStorage = require("filterStorage").FilterStorage; | 32 var FilterStorage = require("filterStorage").FilterStorage; |
| 31 var ElemHide = require("elemHide").ElemHide; | 33 var ElemHide = require("elemHide").ElemHide; |
| 32 var defaultMatcher = require("matcher").defaultMatcher; | 34 var defaultMatcher = matcher.defaultMatcher; |
| 33 var Synchronizer = require("synchronizer").Synchronizer; | 35 var Synchronizer = require("synchronizer").Synchronizer; |
| 34 | 36 |
| 35 var isFirstRun = false; | 37 var isFirstRun = false; |
| 36 FilterNotifier.addListener(function(action) | 38 FilterNotifier.addListener(function(action) |
| 37 { | 39 { |
| 38 if (action == "load") | 40 if (action == "load") |
| 39 { | 41 { |
| 40 importOldData(); | 42 importOldData(); |
| 41 if (!window.localStorage.currentVersion) | 43 if (!window.localStorage.currentVersion) |
| 42 { | 44 { |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 var selectors = ElemHide.getSelectorsForDomain(host, false); | 287 var selectors = ElemHide.getSelectorsForDomain(host, false); |
| 286 event.source.postMessage({reqtype: "get-settings-response", selectors: sel
ectors}); | 288 event.source.postMessage({reqtype: "get-settings-response", selectors: sel
ectors}); |
| 287 break; | 289 break; |
| 288 } | 290 } |
| 289 }, false); | 291 }, false); |
| 290 | 292 |
| 291 setDefaultOptions(); | 293 setDefaultOptions(); |
| 292 createToolbarButton(); | 294 createToolbarButton(); |
| 293 refreshToolbarButton(); | 295 refreshToolbarButton(); |
| 294 loadI18nMessages(); | 296 loadI18nMessages(); |
| OLD | NEW |