diff options
author | Ajay <[email protected]> | 2022-06-06 17:09:34 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2022-06-06 17:09:34 -0400 |
commit | 32a3cb2cfeefa9e4f9d06e56e1e3cc3e5669b892 (patch) | |
tree | 6b05541c9dca88ba6937bbbc3889fe23df02fe15 /src/background.ts | |
parent | d9970bf1104ba5d5e7eb564baee87d688ea91f2e (diff) | |
download | SponsorBlock-32a3cb2cfeefa9e4f9d06e56e1e3cc3e5669b892.tar.gz SponsorBlock-32a3cb2cfeefa9e4f9d06e56e1e3cc3e5669b892.zip |
Forward key presses from popup
Diffstat (limited to 'src/background.ts')
-rw-r--r-- | src/background.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/background.ts b/src/background.ts index aa94df5e..1af6038d 100644 --- a/src/background.ts +++ b/src/background.ts @@ -84,7 +84,7 @@ chrome.runtime.onMessage.addListener(function (request, _, callback) { case "unregisterContentScript": unregisterFirefoxContentScript(request.id) return false; - case "tabs": + case "tabs": { chrome.tabs.query({ active: true, currentWindow: true @@ -92,11 +92,13 @@ chrome.runtime.onMessage.addListener(function (request, _, callback) { chrome.tabs.sendMessage( tabs[0].id, request.data, - (response) => callback(response) + (response) => { + callback(response); + } ); - } - ); + }); return true; + } } }); |