From: Ruben Beltran del Rio Date: Thu, 14 Sep 2023 17:57:23 +0000 (+0200) Subject: Properly allow multiple X-Git-Url: https://git.r.bdr.sh/rbdr/junction/commitdiff_plain/b0cbc085e1ffee3b5ac14313d646c4638973c8a7?ds=inline Properly allow multiple --- diff --git a/extension/junction.js b/extension/junction.js index c3cb4e9..1d5f8a5 100644 --- a/extension/junction.js +++ b/extension/junction.js @@ -1,6 +1,6 @@ const internals = { promisesSupported: !!window.browser, - injectedScript: false, + injectedScript: {}, port: null, currentUrl: null, @@ -62,14 +62,15 @@ const internals = { const activeTabs = await internals.getActiveTabs(); internals.currentUrl = activeTabs[0].url; - if (!internals.injectedScript) { + const id = activeTabs[0].id; + if (!internals.injectedScript[id]) { const execution = await internals.getRoot().tabs.executeScript( activeTabs[0].id, { file: "/build/content_script.js", }, () => { - internals.injectedScript = true; + internals.injectedScript[id] = true; }, ); diff --git a/safari/Junction.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate b/safari/Junction.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate index 7378e70..77cca18 100644 Binary files a/safari/Junction.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate and b/safari/Junction.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/Contents.json b/safari/Junction/Assets.xcassets/AppIcon.appiconset/Contents.json index 64dc11e..8815e3e 100644 --- a/safari/Junction/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/safari/Junction/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,68 +1,68 @@ { - "images" : [ + "images": [ { - "filename" : "icon_16x16.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "16x16" + "filename": "icon_16x16.png", + "idiom": "mac", + "scale": "1x", + "size": "16x16" }, { - "filename" : "icon_16x16@2x.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "16x16" + "filename": "icon_16x16@2x.png", + "idiom": "mac", + "scale": "2x", + "size": "16x16" }, { - "filename" : "icon_32x32.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "32x32" + "filename": "icon_32x32.png", + "idiom": "mac", + "scale": "1x", + "size": "32x32" }, { - "filename" : "icon_32x32@2x.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "32x32" + "filename": "icon_32x32@2x.png", + "idiom": "mac", + "scale": "2x", + "size": "32x32" }, { - "filename" : "icon_128x128.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "128x128" + "filename": "icon_128x128.png", + "idiom": "mac", + "scale": "1x", + "size": "128x128" }, { - "filename" : "icon_128x128@2x.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "128x128" + "filename": "icon_128x128@2x.png", + "idiom": "mac", + "scale": "2x", + "size": "128x128" }, { - "filename" : "icon_256x256.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "256x256" + "filename": "icon_256x256.png", + "idiom": "mac", + "scale": "1x", + "size": "256x256" }, { - "filename" : "icon_256x256@2x.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "256x256" + "filename": "icon_256x256@2x.png", + "idiom": "mac", + "scale": "2x", + "size": "256x256" }, { - "filename" : "icon_512x512.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "512x512" + "filename": "icon_512x512.png", + "idiom": "mac", + "scale": "1x", + "size": "512x512" }, { - "filename" : "icon_512x512@2x.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "512x512" + "filename": "icon_512x512@2x.png", + "idiom": "mac", + "scale": "2x", + "size": "512x512" } ], - "info" : { - "author" : "xcode", - "version" : 1 + "info": { + "author": "xcode", + "version": 1 } }