Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

From options pane, getting toolbar element and hiding it

0 views
Skip to first unread message

jostheim

unread,
Sep 5, 2008, 11:42:12 AM9/5/08
to
Hi-

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

0 new messages