aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/background.ts
diff options
context:
space:
mode:
authorAjay <[email protected]>2022-06-06 17:09:34 -0400
committerAjay <[email protected]>2022-06-06 17:09:34 -0400
commit32a3cb2cfeefa9e4f9d06e56e1e3cc3e5669b892 (patch)
tree6b05541c9dca88ba6937bbbc3889fe23df02fe15 /src/background.ts
parentd9970bf1104ba5d5e7eb564baee87d688ea91f2e (diff)
downloadSponsorBlock-32a3cb2cfeefa9e4f9d06e56e1e3cc3e5669b892.tar.gz
SponsorBlock-32a3cb2cfeefa9e4f9d06e56e1e3cc3e5669b892.zip
Forward key presses from popup
Diffstat (limited to 'src/background.ts')
-rw-r--r--src/background.ts10
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;
+ }
}
});