paperlined.org
apps > mozilla
document updated 15 years ago, on Jul 29, 2009
Often, one wants to change some Firefox setting (ie about:config) from an external program. Ways to do this:

Allow outside programs to inject ANY javascript command into the browser

MozRepl example

// enable the BlockSite addon
Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).setBoolPref("BlockSite.enabled", 1);

// disable the BlockSite addon
Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).setBoolPref("BlockSite.enabled", 0);