diff options
author | Daniel Campoverde <alx@sillybytes.net> | 2017-10-29 20:48:22 -0500 |
---|---|---|
committer | Daniel Campoverde <alx@sillybytes.net> | 2017-10-29 20:48:22 -0500 |
commit | a2651f617f2b1aebd8d12eb868fcbcd5303ed6ea (patch) | |
tree | 74ff9ff4593f4f5d8231750b21e1226e2ae7875a /src/background/tabs.js | |
parent | aeebdcd3ef10bc3a15b6bc000189e0b5774be0e9 (diff) |
Add TAB_FIRST operation
Diffstat (limited to 'src/background/tabs.js')
-rw-r--r-- | src/background/tabs.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/background/tabs.js b/src/background/tabs.js index eed3252..eaff0f6 100644 --- a/src/background/tabs.js +++ b/src/background/tabs.js @@ -79,6 +79,19 @@ const selectNextTab = (current, count) => { }); }; +const selectFirstTab = (current, count) => { + let id = tabs[0].id; + return browser.tabs.update(id, { active: true }); +}; + +// const selectFirstTab = (current, count) => { +// return browser.tabs.query({ currentWindow: true }).then((tabs) => { +// let select = tabs.length; +// let id = tabs[select].id; +// return browser.tabs.update(id, { active: true }); +// }); +// }; + const reload = (current, cache) => { return browser.tabs.reload( current.id, |