Use callback when removing a tab
This commit is contained in:
parent
8971791667
commit
31fe03e038
5
popup.js
5
popup.js
|
@ -228,8 +228,9 @@ function setupTabs(tabs,callback){
|
||||||
tabList.forEach(function(windowTab){
|
tabList.forEach(function(windowTab){
|
||||||
var tabId = parseInt(windowTab.getAttribute("tabId"));
|
var tabId = parseInt(windowTab.getAttribute("tabId"));
|
||||||
if (tabId!==currentTab.id){
|
if (tabId!==currentTab.id){
|
||||||
chrome.tabs.remove(tabId);
|
chrome.tabs.remove(tabId,function(){
|
||||||
windowTab.parentNode.removeChild(windowTab);
|
windowTab.parentNode.removeChild(windowTab);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setTabCount(li.parentNode, 1);
|
setTabCount(li.parentNode, 1);
|
||||||
|
|
Loading…
Reference in a new issue