diff options
author | Daniel Campoverde <alx@sillybytes.net> | 2017-10-29 22:03:46 -0500 |
---|---|---|
committer | Daniel Campoverde <alx@sillybytes.net> | 2017-10-29 22:03:46 -0500 |
commit | d0df1a05a17fd3b30eba215b0f163042878a56b2 (patch) | |
tree | d802ef7ad57b906bd49c0a0a7dbf47cd9163b254 | |
parent | 2c97f8a4f3b31d38922783b8f5e6237da33ce86b (diff) |
Clean up TAB_FIRST operation
-rw-r--r-- | src/background/actions/operation.js | 2 | ||||
-rw-r--r-- | src/background/tabs.js | 4 | ||||
-rw-r--r-- | src/shared/default-settings.js | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/background/actions/operation.js b/src/background/actions/operation.js index 7c0df4e..074157b 100644 --- a/src/background/actions/operation.js +++ b/src/background/actions/operation.js @@ -21,7 +21,7 @@ const exec = (operation, tab) => { case operations.TAB_NEXT: return tabs.selectNextTab(tab.index, operation.count); case operations.TAB_FIRST: - return tabs.selectFirstTab(tab.index, operation.count); + return tabs.selectFirstTab(); case operations.TAB_RELOAD: return tabs.reload(tab, operation.cache); case operations.ZOOM_IN: diff --git a/src/background/tabs.js b/src/background/tabs.js index 2028503..0567e68 100644 --- a/src/background/tabs.js +++ b/src/background/tabs.js @@ -79,14 +79,14 @@ const selectNextTab = (current, count) => { }); }; -const selectFirstTab = (current, count) => { +const selectFirstTab = () => { return browser.tabs.query({ currentWindow: true }).then((tabs) => { let id = tabs[0].id; return browser.tabs.update(id, { active: true }); }); }; -// const selectFirstTab = (current, count) => { +// const selectLastTab = (current, count) => { // return browser.tabs.query({ currentWindow: true }).then((tabs) => { // let select = tabs.length; // let id = tabs[select].id; diff --git a/src/shared/default-settings.js b/src/shared/default-settings.js index e70c7dd..a929643 100644 --- a/src/shared/default-settings.js +++ b/src/shared/default-settings.js @@ -28,7 +28,7 @@ export default { "u": { "type": "tabs.reopen" }, "K": { "type": "tabs.prev", "count": 1 }, "J": { "type": "tabs.next", "count": 1 }, - "g0": { "type": "tabs.first", "count": 1 }, + "g0": { "type": "tabs.first"}, "r": { "type": "tabs.reload", "cache": false }, "R": { "type": "tabs.reload", "cache": true }, "zi": { "type": "zoom.in" }, |