[Project_owners] Hide statusbar icon

Neil neil at parkwaycc.co.uk
Sun Sep 16 09:02:22 PDT 2007


Christian Arnold wrote:

> function statusbarIcon(iconVisible) {
>     var wm = 
> Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator); 
>
>     var type = 'navigator:browser'
>     var enumerator = wm.getEnumerator(type);
>     while(enumerator.hasMoreElements()) {
>         var win = enumerator.getNext();
>         var panel = 
> win.document.getElementById("your-extension-statusbarpanel");
>         panel.hidden = iconVisible;
>     }
> }
>
> The XUL-Part:
> <checkbox id="prefstatusbarvisible" preference="statusbarvisible" 
> label="&prefstatusbarvisible.label;" onclick="return 
> statusbarIcon(this.checked);"/>

There are at least two errors with this code...


More information about the Project_owners mailing list