Created
September 29, 2011 22:26
-
-
Save davehunt/1252110 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PREFS.JS | |
/** | |
* Retrieve the value of the homepage preference | |
* | |
* @memberOf prefs | |
* @param {Boolean|Number|String|Object} [aDefaultValue] | |
* Default value which will be used if the preference doesn't exist. | |
* @param {PrefBranch} [aBranch] | |
* Preferences branch to use. | |
* | |
* @returns {Boolean|Number|String|Object} The value of the preference | |
*/ | |
function getHomepagePref(aDefaultValue, aBranch) { | |
return getPref(Ci.nsIPrefLocalizedString, "browser.startup.homepage", | |
aDefaultValue, aBranch); | |
} | |
// TEST.JS | |
var prefs = require("../../../lib/prefs"); | |
... | |
prefs.getHomepagePref(undefined, prefs.defaultBranch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment