LEFT | RIGHT |
(no file at all) | |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); | 18 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); |
19 Cu.import("resource://gre/modules/Services.jsm"); | 19 Cu.import("resource://gre/modules/Services.jsm"); |
20 | 20 |
21 let {Utils} = require("utils"); | 21 let {Utils} = require("utils"); |
22 let {Prefs} = require("prefs"); | 22 let {Prefs} = require("prefs"); |
23 let {Policy} = require("contentPolicy"); | 23 let {Policy} = require("contentPolicy"); |
24 let {FilterListener} = require("filterListener"); | |
25 let {FilterStorage} = require("filterStorage"); | 24 let {FilterStorage} = require("filterStorage"); |
26 let {FilterNotifier} = require("filterNotifier"); | 25 let {FilterNotifier} = require("filterNotifier"); |
27 let {RequestNotifier} = require("requestNotifier"); | 26 let {RequestNotifier} = require("requestNotifier"); |
28 let {Filter} = require("filterClasses"); | 27 let {Filter} = require("filterClasses"); |
29 let {Subscription, SpecialSubscription, DownloadableSubscription} = require("sub
scriptionClasses"); | 28 let {Subscription, SpecialSubscription, DownloadableSubscription} = require("sub
scriptionClasses"); |
30 let {Synchronizer} = require("synchronizer"); | 29 let {Synchronizer} = require("synchronizer"); |
31 let {KeySelector} = require("keySelector"); | 30 let {KeySelector} = require("keySelector"); |
32 let {Notification} = require("notification"); | 31 let {Notification} = require("notification"); |
33 let {initAntiAdblockNotification} = require("antiadblockInit"); | 32 let {initAntiAdblockNotification} = require("antiadblockInit"); |
34 | 33 |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1183 * Toggles "Count filter hits" option. | 1182 * Toggles "Count filter hits" option. |
1184 */ | 1183 */ |
1185 toggleSaveStats: function(window) | 1184 toggleSaveStats: function(window) |
1186 { | 1185 { |
1187 if (Prefs.savestats) | 1186 if (Prefs.savestats) |
1188 { | 1187 { |
1189 if (!Utils.confirm(window, Utils.getString("clearStats_warning"))) | 1188 if (!Utils.confirm(window, Utils.getString("clearStats_warning"))) |
1190 return; | 1189 return; |
1191 | 1190 |
1192 FilterStorage.resetHitCounts(); | 1191 FilterStorage.resetHitCounts(); |
1193 FilterListener.setDirty(0); // Force saving to disk | |
1194 Prefs.savestats = false; | 1192 Prefs.savestats = false; |
1195 } | 1193 } |
1196 else | 1194 else |
1197 Prefs.savestats = true; | 1195 Prefs.savestats = true; |
1198 }, | 1196 }, |
1199 | 1197 |
1200 /** | 1198 /** |
1201 * Sets the current filter subscription in a single-subscription scenario, | 1199 * Sets the current filter subscription in a single-subscription scenario, |
1202 * all other subscriptions will be removed. | 1200 * all other subscriptions will be removed. |
1203 */ | 1201 */ |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1950 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], | 1948 ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], |
1951 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] | 1949 ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] |
1952 ]; | 1950 ]; |
1953 | 1951 |
1954 onShutdown.add(function() | 1952 onShutdown.add(function() |
1955 { | 1953 { |
1956 for (let window in UI.applicationWindows) | 1954 for (let window in UI.applicationWindows) |
1957 if (UI.isBottombarOpen(window)) | 1955 if (UI.isBottombarOpen(window)) |
1958 UI.toggleBottombar(window); | 1956 UI.toggleBottombar(window); |
1959 }); | 1957 }); |
LEFT | RIGHT |