Wednesday 15 April 2015

Change window width with the Firefox Addon SDK -


I'm trying to create an addon that resizes the current Firefox window. I have realized that I should use the pageMod to include a contentScriptFile to inject a script into the current page. From there I am trying to do window.resizeTo (400, 800); But it does not do anything. I can get the window.innerWidth so that the window object is working. I have tried firing with resizeTo with self.port.on , but there is no luck.

It seems that this may be due to window boundaries. ResetizeTo ()

Please see -.

The above link - Two rules apply:

  1) Can not change the size of the window / tab that is not created by the window. open. 2) If a tab is in a tabbed window, then the size of the tab can not be changed. Along with this, make sure that Resizing FF is enabled in JS (Firefox & G; Option & gt; Option & gt; Content) (Sub-tab) and then click Advanced button next to Advanced JavaScript. )   

No comments:

Post a Comment