From 76c820889f126bf8ec9c406f85eb4f9b623dcf57 Mon Sep 17 00:00:00 2001 From: Adam Karlsten Date: Sat, 15 Jan 2022 01:58:28 +0100 Subject: [PATCH] Lets switchTab switch to other Chrome windows, with focus --- src/background.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/background.js b/src/background.js index 7e0c7da..5920c78 100644 --- a/src/background.js +++ b/src/background.js @@ -224,8 +224,13 @@ function getBookmarks() { // Lots of different actions function switchTab(tab) { chrome.tabs.highlight({ - tabs: tab.index + tabs: tab.index, + windowId: tab.windowId }) + chrome.windows.update( + tab.windowId, + { focused: true } + ) } function goBack(tab) { chrome.tabs.goBack({