Permalink
Browse files

Options window allows stats opt in/out.

Refs #1651
  • Loading branch information...
1 parent df7d58a commit 68adc2de8396eef33a55574c48a8014b5a3bf7f8 @arantius committed Nov 7, 2012
Showing with 12 additions and 1 deletion.
  1. +5 −1 content/options.js
  2. +5 −0 content/options.xul
  3. +2 −0 locale/en-US/greasemonkey.dtd
View
@@ -5,7 +5,9 @@ function GM_loadOptions() {
document.getElementById('check-uninstall')
.checked = GM_prefRoot.getValue('uninstallPreferences');
document.getElementById('secure-update')
- .checked = GM_prefRoot.getValue('requireSecureUpdates');
+ .checked = GM_prefRoot.getValue('requireSecureUpdates');
+ document.getElementById('submit-stats')
+ .checked = GM_prefRoot.getValue('stats.optedin');
document.getElementById('globalExcludes')
.pages = GM_util.getService().config.globalExcludes;
}
@@ -15,6 +17,8 @@ function GM_saveOptions(checkbox) {
!!document.getElementById('check-uninstall').checked);
GM_prefRoot.setValue('requireSecureUpdates',
!!document.getElementById('secure-update').checked);
+ GM_prefRoot.setValue('stats.optedin',
+ !!document.getElementById('submit-stats').checked);
GM_util.getService().config.globalExcludes =
document.getElementById('globalExcludes').pages;
}
View
@@ -42,6 +42,11 @@
</groupbox>
<groupbox>
+ <caption label="&AnonymousStatistics;" />
+ <checkbox id="submit-stats" label="&SubmitStats;" />
+ </groupbox>
+
+ <groupbox>
<caption label="&options.globalExcludes;" />
<cludes id="globalExcludes" />
</groupbox>
@@ -31,6 +31,8 @@
<!ENTITY options.globalExcludes "Global Excludes">
<!ENTITY userscripts "User Scripts">
<!ENTITY Uninstall "Uninstall">
+<!ENTITY AnonymousStatistics "Anonymous Statistics">
+<!ENTITY SubmitStats "Gather and submit anonymous usage statistics to improve Greasemonkey.">
<!ENTITY AlsoUninstallPrefs "Also uninstall associated preferences">
<!ENTITY UpdateChecking "Update Checking">
<!ENTITY RequireSecureUpdates "Require secure updates">

0 comments on commit 68adc2d

Please sign in to comment.