Kërkoni te Asistenca

Shmangni karremëzime gjoja asistence. S’do t’ju kërkojmë kurrë të bëni një thirrje apo të dërgoni tekst te një numër telefoni, apo të na jepni të dhëna personale. Ju lutemi, raportoni veprimtari të dyshimtë duke përdorur mundësinë “Raportoni Abuzim”.

Learn More

How to detect the presence of menubar from the Firefox extension ?

  • 2 përgjigje
  • 1 e ka hasur këtë problem
  • 1 parje
  • Përgjigjja më e re nga Raveendra_Pai

more options

Hi, I have created a firefox extension, that need to detect the presence/absence of the menubar in the browser window. How do i query this from my Extension's javascript ?

Kindly help me in doing so


Thanking you

Raveendra

Hi, I have created a firefox extension, that need to detect the presence/absence of the menubar in the browser window. How do i query this from my Extension's javascript ? Kindly help me in doing so Thanking you Raveendra

Ndryshuar nga Raveendra_Pai

Zgjidhje e zgjedhur

Thanks a lot.. ! This solved my problem.. it works :)

Lexojeni këtë përgjigje brenda kontekstit 👍 0

Krejt Përgjigjet (2)

more options

You can check the height of the menu bar.

You can use code like this as a start:

const {classes:Cc,interfaces:Ci} = Components;
var wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
var wd = wm.getMostRecentWindow("navigator:browser").document;
var mb = wd.getElementById('toolbar-menubar');

alert(wd.defaultView.getComputedStyle(mb,"").getPropertyValue('height'));

A good place to ask advice is at the MozillaZine Extension Development forum

The helpers at that forum are more knowledgeable about web development issues.
You need to register at the MozillaZine forum site in order to post at that forum.

more options

Zgjidhja e Zgjedhur

Thanks a lot.. ! This solved my problem.. it works :)