From 6393c915648cc9d2941b8c9194a13ff078dafae5 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sun, 27 Sep 2020 20:37:18 +0200 Subject: Make tada accessible on web --- extension/junction.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'extension/junction.js') 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() { -- cgit