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(); |
Wladimir Palant
2016/02/15 12:25:39
Two notes:
1) I think this code is better placed
saroyanm
2016/02/19 17:38:09
Good point. Done.
|
+ |
+ Prefs.sendstats = allow; |
+} |
Wladimir Palant
2016/02/15 12:25:39
This code doesn't really belong here - all the log
saroyanm
2016/02/19 17:38:10
Done.
|
+ |
+window.addEventListener("load", function() |
+{ |
+ ListManager.init(); |
+ E("sendStats").checked = Prefs.sendstats; |
Wladimir Palant
2016/02/15 12:25:39
What if Prefs.savestats isn't set? I think we don'
saroyanm
2016/02/19 17:38:09
Good point, Done.
|
+}, false); |