Added "Disable automatic scraper updates" preference. (Up to Dan to implement this)
This commit is contained in:
parent
77b8bfd0b2
commit
27025befef
|
@ -1,25 +1,25 @@
|
||||||
var prefManager = Components.classes["@mozilla.org/preferences-service;1"]
|
var prefManager = Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
.getService(Components.interfaces.nsIPrefBranch);
|
.getService(Components.interfaces.nsIPrefBranch);
|
||||||
var whateverBox;
|
var autoUpdateBox;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
To add a new preference:
|
To add a new preference:
|
||||||
* modify defaults/prefs.js
|
1) modify defaults/preferences/scholar.js
|
||||||
* add a control to prefs.xul
|
2) in this document:
|
||||||
* in this document:
|
a) add var above
|
||||||
1) add var above
|
b) add lines to init() function
|
||||||
2) add lines to init() function
|
c) add line to accept() function
|
||||||
3) add line to accept() function
|
3) add a control to prefs.xul
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
whateverBox = document.getElementById('whateverBox');
|
autoUpdateBox = document.getElementById('autoUpdateBox');
|
||||||
whateverBox.checked = prefManager.getBoolPref('extensions.scholar.whatever');
|
autoUpdateBox.checked = prefManager.getBoolPref('extensions.scholar.automaticScraperUpdates');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function accept()
|
function accept()
|
||||||
{
|
{
|
||||||
prefManager.setBoolPref('extensions.scholar.whatever', whateverBox.checked);
|
prefManager.setBoolPref('extensions.scholar.automaticScraperUpdates', autoUpdateBox.checked);
|
||||||
}
|
}
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
<dialogheader id="header" title="&scholar.name;" description="&scholar.preferences.title;"/>
|
<dialogheader id="header" title="&scholar.name;" description="&scholar.preferences.title;"/>
|
||||||
|
|
||||||
<checkbox id="whateverBox" label="Whatever!"/>
|
<checkbox id="autoUpdateBox" label="Automatically check for updated scrapers"/>
|
||||||
|
|
||||||
|
|
||||||
</dialog>
|
</dialog>
|
|
@ -1,4 +1,4 @@
|
||||||
// These are DEFAULT prefs for the INSTALL. You will have to reinstall the extension to see differences!
|
// These are DEFAULT prefs for the INSTALL. You will have to reinstall the extension to see differences!
|
||||||
|
|
||||||
// Display internal shortcut
|
// Display internal shortcut
|
||||||
pref("extensions.scholar.whatever", false);
|
pref("extensions.scholar.automaticScraperUpdates",true);
|
Loading…
Reference in New Issue
Block a user