|
|
@ -1,4 +1,5 @@ |
|
|
|
let prevSelTab = 0; |
|
|
|
let prevSelTab = 0; |
|
|
|
|
|
|
|
let currSelTab = 2; |
|
|
|
|
|
|
|
|
|
|
|
const closeTab = (id) => { |
|
|
|
const closeTab = (id) => { |
|
|
|
return browser.tabs.remove(id); |
|
|
|
return browser.tabs.remove(id); |
|
|
@ -111,14 +112,21 @@ const selectLastTab = () => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const selectPrevSelTab = () => {
|
|
|
|
|
|
|
|
// let tmpPrevSelTab = null;
|
|
|
|
|
|
|
|
// return browser.tabs.query({ currentWindow: true, active: true }).then(
|
|
|
|
|
|
|
|
// (tabs) => {
|
|
|
|
|
|
|
|
// tmpPrevSelTab = tabs[0].id;
|
|
|
|
|
|
|
|
// browser.tabs.update(prevSelTab, { active: true });
|
|
|
|
|
|
|
|
// prevSelTab = tmpPrevSelTab;
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
|
|
const selectPrevSelTab = () => { |
|
|
|
const selectPrevSelTab = () => { |
|
|
|
let tmpPrevSelTab = null; |
|
|
|
let tmpPrevSelTab = prevSelTab; |
|
|
|
return browser.tabs.query({ currentWindow: true, active: true }).then( |
|
|
|
prevSelTab = currSelTab; |
|
|
|
(tabs) => { |
|
|
|
currSelTab = tmpPrevSelTab; |
|
|
|
tmpPrevSelTab = tabs[0].id; |
|
|
|
return browser.tabs.update(currSelTab, { active: true }); |
|
|
|
browser.tabs.update(prevSelTab, { active: true }); |
|
|
|
|
|
|
|
prevSelTab = tmpPrevSelTab; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const reload = (current, cache) => { |
|
|
|
const reload = (current, cache) => { |
|
|
|