diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2020-09-27 20:37:18 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2020-09-27 20:37:18 +0200 |
| commit | 6393c915648cc9d2941b8c9194a13ff078dafae5 (patch) | |
| tree | 28406d128c0bb4d33bbb8ff37b5accf611097221 /extension | |
| parent | 4757c4616d5d7106cd023f06e5e5ba04d01bbb07 (diff) | |
Make tada accessible on web
Diffstat (limited to 'extension')
| -rw-r--r-- | extension/junction.js | 16 | ||||
| -rw-r--r-- | extension/manifest.json | 6 |
2 files changed, 14 insertions, 8 deletions
diff --git a/extension/junction.js b/extension/junction.js index 16bc9f3..a662f6c 100644 --- a/extension/junction.js +++ b/extension/junction.js @@ -56,14 +56,16 @@ const internals = { internals.getRoot().browserAction.disable(); const activeTabs = await internals.getActiveTabs(); - const execution = await internals.getRoot().tabs.executeScript(activeTabs[0].id, { - file: '/content_script.js' - }); - if (!execution[0]) { - internals.onDisconnect(); - } - }, + const execution = await internals.getRoot().tabs.executeScript(activeTabs[0].id, { + file: '/content_script.js' + }); + + if (!execution || !execution[0]) { + internals.onDisconnect(); + } + } + , hangUp() { diff --git a/extension/manifest.json b/extension/manifest.json index df3ecc4..2a5723a 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -21,5 +21,9 @@ "16": "icons/action-16.png", "32": "icons/action-32.png" } - } + }, + + "web_accessible_resources": [ + "sounds/tada.wav" + ] } |