|
|
@ -1,4 +1,4 @@ |
|
|
|
var prevSelTab = 0; |
|
|
|
let prevSelTab = 0; |
|
|
|
|
|
|
|
|
|
|
|
const closeTab = (id) => { |
|
|
|
const closeTab = (id) => { |
|
|
|
return browser.tabs.remove(id); |
|
|
|
return browser.tabs.remove(id); |
|
|
@ -112,12 +112,9 @@ const selectLastTab = () => { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const selectPrevSelTab = () => { |
|
|
|
const selectPrevSelTab = () => { |
|
|
|
var tmpPrevSelTab = null; |
|
|
|
let tmpPrevSelTab = null; |
|
|
|
browser.tabs.query({ currentWindow: true, active: true }).then((tabs) => { |
|
|
|
return browser.tabs.query({ currentWindow: true, active: true }).then((tabs) => { |
|
|
|
tmpPrevSelTab = tabs[0].id; |
|
|
|
tmpPrevSelTab = tabs[0].id; |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return browser.tabs.query({ currentWindow: true }).then((tabs) => { |
|
|
|
|
|
|
|
browser.tabs.update(prevSelTab, { active: true }); |
|
|
|
browser.tabs.update(prevSelTab, { active: true }); |
|
|
|
prevSelTab = tmpPrevSelTab; |
|
|
|
prevSelTab = tmpPrevSelTab; |
|
|
|
}); |
|
|
|
}); |
|
|
|