]> git.r.bdr.sh - rbdr/junction/commitdiff
Properly allow multiple
authorRuben Beltran del Rio <redacted>
Thu, 14 Sep 2023 17:57:23 +0000 (19:57 +0200)
committerRuben Beltran del Rio <redacted>
Thu, 14 Sep 2023 17:57:23 +0000 (19:57 +0200)
extension/junction.js
safari/Junction.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate
safari/Junction/Assets.xcassets/AppIcon.appiconset/Contents.json

index c3cb4e9db5d221846e6ecbad41dcda2855d088e5..1d5f8a50b26c5ef8546f43245ba771862fac0aa2 100644 (file)
@@ -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;
         },
       );
 
index 7378e7023511b37628082854667df9f3f9a059f9..77cca1818addf0c7ced5b330592fce7828eafdef 100644 (file)
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
index 64dc11ee7438ff9d41f0fb625e861d6bb881024c..8815e3ec1c012610d97c6ddaf1d24de6b82903b2 100644 (file)
@@ -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
   }
 }