I wanted to give users the option to hide the toolbar piece of an
extension I am writing (it is more than just a toolbar). However when
working in the scope of the options pane dialog window I am having no
luck in document.getElementById('mytoolbar').
I tried getting the main window a variety of ways...
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var mainWindow = wm.getMostRecentWindow("navigator:browser");
and all the rest of the ways on the mozilla "Working with Windows"
page.
So how do I withing javascript run on a checkbox click in the
preferences pane, get a toolbar XUL element. From there I know how to
hide it (hidden=true).
Any help is much appreciated.
James