|
|
@ -1,12 +1,10 @@ |
|
|
|
let prevSelTab = 1; |
|
|
|
let prevSelTab = 1; |
|
|
|
let currSelTab = 1; |
|
|
|
let currSelTab = 1; |
|
|
|
|
|
|
|
|
|
|
|
browser.tabs.onActivated.addListener(tabChangeHandler); |
|
|
|
browser.tabs.onActivated.addListener((activeInfo) => { |
|
|
|
|
|
|
|
|
|
|
|
function tabChangeHandler(activeInfo) { |
|
|
|
|
|
|
|
prevSelTab = currSelTab; |
|
|
|
prevSelTab = currSelTab; |
|
|
|
currSelTab = activeInfo.tabId; |
|
|
|
currSelTab = activeInfo.tabId; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const closeTab = (id) => { |
|
|
|
const closeTab = (id) => { |
|
|
|
return browser.tabs.remove(id); |
|
|
|
return browser.tabs.remove(id); |
|
|
|