]> git.r.bdr.sh - rbdr/junction/commitdiff
Make tada accessible on web
authorRuben Beltran del Rio <redacted>
Sun, 27 Sep 2020 18:37:18 +0000 (20:37 +0200)
committerRuben Beltran del Rio <redacted>
Sun, 27 Sep 2020 18:37:18 +0000 (20:37 +0200)
extension/junction.js
extension/manifest.json

index 16bc9f379c318f619e930fd57fb5454c5290df52..a662f6c8f612150cca9843e57262e613e9ea7075 100644 (file)
@@ -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() {
 
index df3ecc4fe4b7231209ac8a234371d719a07ad7cf..2a5723a98800ec1d37a7e9f8d2157aca6bc24a27 100644 (file)
@@ -21,5 +21,9 @@
       "16": "icons/action-16.png",
       "32": "icons/action-32.png"
     }
-  }
+  },
+
+  "web_accessible_resources": [
+    "sounds/tada.wav"
+  ]
 }