diff options
Diffstat (limited to 'src/background/index.js')
-rw-r--r-- | src/background/index.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/background/index.js b/src/background/index.js index e5b08c5..d8047a6 100644 --- a/src/background/index.js +++ b/src/background/index.js @@ -60,12 +60,11 @@ const normalizeUrl = (string) => { const cmdBuffer = (arg) => { if (isNaN(arg)) { - // TODO support buffer identification by non-number value - throw new TypeError(`${arg} is not a number`); + tabs.selectByKeyword(arg); + } else { + let index = parseInt(arg, 10) - 1; + tabs.selectAt(index); } - - let index = parseInt(arg, 10) - 1; - tabs.selectAt(index); } const cmdEnterHandle = (request, sender) => { |