I have a solution. You can try this. The function below will return you the unique identifier of the current tab.
var get_current_tab_id = function()
{
var doc = gBrowser.contentDocument;
var tab = null;
var targetBrowserIndex = gBrowser.getBrowserIndexForDocument(doc);
if (targetBrowserIndex != -1)
tab = gBrowser.tabContainer.childNodes[targetBrowserIndex];
else
return(null);
return(tab.linkedPanel);
}
source
share