Skip to content

Commit

Permalink
Options window allows stats opt in/out.
Browse files Browse the repository at this point in the history
  • Loading branch information
arantius committed Nov 7, 2012
1 parent df7d58a commit 68adc2d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
6 changes: 5 additions & 1 deletion content/options.js
Expand Up @@ -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;
}
Expand All @@ -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;
}
5 changes: 5 additions & 0 deletions content/options.xul
Expand Up @@ -41,6 +41,11 @@
<checkbox id="secure-update" label="&RequireSecureUpdates;" />
</groupbox>

<groupbox>
<caption label="&AnonymousStatistics;" />
<checkbox id="submit-stats" label="&SubmitStats;" />
</groupbox>

<groupbox>
<caption label="&options.globalExcludes;" />
<cludes id="globalExcludes" />
Expand Down
2 changes: 2 additions & 0 deletions locale/en-US/greasemonkey.dtd
Expand Up @@ -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">
Expand Down

0 comments on commit 68adc2d

Please sign in to comment.