Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/ui/filters-subscriptionview.js

Issue 6337686776315904: Issue 394 - hit statistics tool data collection (Closed)
Patch Set: Use braces for consistency Created April 16, 2015, 2:05 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/content/ui/filters.xul ('k') | chrome/locale/en-US/filters.dtd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
@@ -327,4 +329,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);
« no previous file with comments | « chrome/content/ui/filters.xul ('k') | chrome/locale/en-US/filters.dtd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld