diff options
Diffstat (limited to 'src/background.ts')
-rw-r--r-- | src/background.ts | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/background.ts b/src/background.ts index d576fba1..aa94df5e 100644 --- a/src/background.ts +++ b/src/background.ts @@ -84,7 +84,20 @@ chrome.runtime.onMessage.addListener(function (request, _, callback) { case "unregisterContentScript": unregisterFirefoxContentScript(request.id) return false; - } + case "tabs": + chrome.tabs.query({ + active: true, + currentWindow: true + }, tabs => { + chrome.tabs.sendMessage( + tabs[0].id, + request.data, + (response) => callback(response) + ); + } + ); + return true; + } }); //add help page on install |