Index: chrome/content/ui/filters-subscriptionview.js |
=================================================================== |
--- a/chrome/content/ui/filters-subscriptionview.js |
+++ b/chrome/content/ui/filters-subscriptionview.js |
@@ -15,6 +15,8 @@ |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
+let {FilterHits} = require("filterHits"); |
+ |
/** |
* Fills a list of filter groups and keeps it updated. |
* @param {Element} list richlistbox element to be filled |
@@ -324,4 +326,19 @@ |
FilterStorage.removeSubscription(subscription); |
}; |
-window.addEventListener("load", ListManager.init, false); |
+/** |
+ * Toggles option for sending filter hit statistics. |
+ */ |
+function toggleSendStats(/**Boolean*/ allow) |
+{ |
+ if (!allow) |
+ FilterHits.resetFilterHits(); |
+ |
+ Prefs.sendstats = allow; |
+} |
+ |
+window.addEventListener("load", function() |
+{ |
+ ListManager.init(); |
+ E("sendStats").checked = Prefs.sendstats; |
+}, false); |