zotero/chrome/chromeFiles/content/scholar/preferences.js
David Norton 7aecfd5190 Added basic preferences support.
Removed all trace of 'object' from sidebar.js.

More code renaming.
2006-05-18 18:39:55 +00:00

25 lines
No EOL
637 B
JavaScript

var prefManager = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
var whateverBox;
/*
To add a new preference:
* modify defaults/prefs.js
* add a control to prefs.xul
* in this document:
1) add var above
2) add lines to init() function
3) add line to accept() function
*/
function init()
{
whateverBox = document.getElementById('whateverBox');
whateverBox.checked = prefManager.getBoolPref('extensions.scholar.whatever');
}
function accept()
{
prefManager.setBoolPref('extensions.scholar.whatever', whateverBox.checked);
}