firefox addon - How to get the tab Index of the right clicked inactive tab? -



firefox addon - How to get the tab Index of the right clicked inactive tab? -

who tab index of right clicked tab fires tab context-menu. tab not active tab (not selectedindex)?

as example. "close tabs right" in tab context menu works regardless of tab (active/not-active) tab right-clicked. how right tab index?

listen for popupshown event of tabcontextmenu element.

since restartless addon assume have reference chromewindow.

class="lang-js prettyprint-override">var tabcontextmenu = chromewin.document.getelementbyid("tabcontextmenu"); tabcontextmenu.addeventlistener("popupshown", function(){ var rightclickedtab = chromewin.tabcontextmenu.contexttab; // proceed wish }, false);

you can add together own menu item , hear command event.

in case, remember cleanup when extension gets unloaded.

firefox-addon firefox-addon-restartless

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -