]> git.r.bdr.sh - rbdr/junction/commitdiff
Add safari code
authorRuben Beltran del Rio <redacted>
Wed, 13 Sep 2023 16:39:01 +0000 (18:39 +0200)
committerRuben Beltran del Rio <redacted>
Wed, 13 Sep 2023 16:39:01 +0000 (18:39 +0200)
34 files changed:
Makefile
safari/Junction Extension/Info.plist [new file with mode: 0644]
safari/Junction Extension/Junction_Extension.entitlements [new file with mode: 0644]
safari/Junction Extension/SafariWebExtensionHandler.swift [new file with mode: 0644]
safari/Junction.xcodeproj/project.pbxproj [new file with mode: 0644]
safari/Junction.xcodeproj/project.xcworkspace/contents.xcworkspacedata [new file with mode: 0644]
safari/Junction.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist [new file with mode: 0644]
safari/Junction.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate [new file with mode: 0644]
safari/Junction.xcodeproj/xcuserdata/rbdr.xcuserdatad/xcschemes/xcschememanagement.plist [new file with mode: 0644]
safari/Junction/AppDelegate.swift [new file with mode: 0644]
safari/Junction/Assets.xcassets/AccentColor.colorset/Contents.json [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/Contents.json [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_128x128.png [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_16x16.png [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_256x256.png [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_32x32.png [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_512x512.png [new file with mode: 0644]
safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png [new file with mode: 0644]
safari/Junction/Assets.xcassets/Contents.json [new file with mode: 0644]
safari/Junction/Assets.xcassets/LargeIcon.imageset/Contents.json [new file with mode: 0644]
safari/Junction/Base.lproj/Main.html [new file with mode: 0644]
safari/Junction/Base.lproj/Main.storyboard [new file with mode: 0644]
safari/Junction/Junction.entitlements [new file with mode: 0644]
safari/Junction/Resources/Icon.png [new file with mode: 0644]
safari/Junction/Resources/Script.js [new file with mode: 0644]
safari/Junction/Resources/Style.css [new file with mode: 0644]
safari/Junction/ViewController.swift [new file with mode: 0644]
safari/JunctionTests/JunctionTests.swift [new file with mode: 0644]
safari/JunctionUITests/JunctionUITests.swift [new file with mode: 0644]
safari/JunctionUITests/JunctionUITestsLaunchTests.swift [new file with mode: 0644]

index 14c1f2db4d84185e871f82607b903b17d733d905..75433eadf8465e4c0eb970a49fffc3d0a47ea8f4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ docker-build:
 build: create-build-folder
        cd extension && pnpm build
 
 build: create-build-folder
        cd extension && pnpm build
 
-package: package-for-firefox package-for-chrome
+package: package-for-firefox package-for-chrome package-for-safari
 
 package-for-firefox: build
        cd extension && zip -r ../build/junction.xpi manifest.json junction.js build/content_script.js icons/ sounds/
 
 package-for-firefox: build
        cd extension && zip -r ../build/junction.xpi manifest.json junction.js build/content_script.js icons/ sounds/
@@ -17,5 +17,9 @@ package-for-firefox: build
 package-for-chrome: build
        cd extension && zip -r ../build/junction.zip manifest.json junction.js build/content_script.js icons/ sounds/
 
 package-for-chrome: build
        cd extension && zip -r ../build/junction.zip manifest.json junction.js build/content_script.js icons/ sounds/
 
+package-for-safari: build
+       xcodebuild build -project safari/Junction.xcodeproj -scheme Junction -configuration Release -derivedDataPath ./build/_xcode
+       cp -r ./build/_xcode/Build/Products/Release/Junction.app ./build/
+
 create-build-folder:
        mkdir -p build
 create-build-folder:
        mkdir -p build
diff --git a/safari/Junction Extension/Info.plist b/safari/Junction Extension/Info.plist
new file mode 100644 (file)
index 0000000..9ee504d
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>NSExtension</key>
+       <dict>
+               <key>NSExtensionPointIdentifier</key>
+               <string>com.apple.Safari.web-extension</string>
+               <key>NSExtensionPrincipalClass</key>
+               <string>$(PRODUCT_MODULE_NAME).SafariWebExtensionHandler</string>
+       </dict>
+</dict>
+</plist>
diff --git a/safari/Junction Extension/Junction_Extension.entitlements b/safari/Junction Extension/Junction_Extension.entitlements
new file mode 100644 (file)
index 0000000..f2ef3ae
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+    <key>com.apple.security.app-sandbox</key>
+    <true/>
+    <key>com.apple.security.files.user-selected.read-only</key>
+    <true/>
+</dict>
+</plist>
diff --git a/safari/Junction Extension/SafariWebExtensionHandler.swift b/safari/Junction Extension/SafariWebExtensionHandler.swift
new file mode 100644 (file)
index 0000000..58f680c
--- /dev/null
@@ -0,0 +1,38 @@
+//
+//  SafariWebExtensionHandler.swift
+//  Junction Extension
+//
+//  Created by Ruben Beltran del Rio on 9/13/23.
+//
+
+import SafariServices
+import os.log
+
+class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
+
+    func beginRequest(with context: NSExtensionContext) {
+        let request = context.inputItems.first as? NSExtensionItem
+
+        let profile: UUID?
+        if #available(iOS 17.0, macOS 14.0, *) {
+            profile = request?.userInfo?[SFExtensionProfileKey] as? UUID
+        } else {
+            profile = request?.userInfo?["profile"] as? UUID
+        }
+
+        let message: Any?
+        if #available(iOS 17.0, macOS 14.0, *) {
+            message = request?.userInfo?[SFExtensionMessageKey]
+        } else {
+            message = request?.userInfo?["message"]
+        }
+
+        os_log(.default, "Received message from browser.runtime.sendNativeMessage: %@ (profile: %@)", String(describing: message), profile?.uuidString ?? "none")
+
+        let response = NSExtensionItem()
+        response.userInfo = [ SFExtensionMessageKey: [ "echo": message ] ]
+
+        context.completeRequest(returningItems: [ response ], completionHandler: nil)
+    }
+
+}
diff --git a/safari/Junction.xcodeproj/project.pbxproj b/safari/Junction.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..8a0fb97
--- /dev/null
@@ -0,0 +1,829 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 56;
+       objects = {
+
+/* Begin PBXBuildFile section */
+               B541F6352AB20E2000A08651 /* junction.js in Resources */ = {isa = PBXBuildFile; fileRef = B541F6312AB20E1F00A08651 /* junction.js */; };
+               B541F6362AB20E2000A08651 /* icons in Resources */ = {isa = PBXBuildFile; fileRef = B541F6322AB20E1F00A08651 /* icons */; };
+               B541F6372AB20E2000A08651 /* sounds in Resources */ = {isa = PBXBuildFile; fileRef = B541F6332AB20E1F00A08651 /* sounds */; };
+               B541F6382AB20E2000A08651 /* manifest.json in Resources */ = {isa = PBXBuildFile; fileRef = B541F6342AB20E1F00A08651 /* manifest.json */; };
+               B57836502AB21406006488FE /* build in Resources */ = {isa = PBXBuildFile; fileRef = B578364F2AB21406006488FE /* build */; };
+               B5E6E79D2AB20D7700D7B76B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E6E79C2AB20D7700D7B76B /* AppDelegate.swift */; };
+               B5E6E7A12AB20D7700D7B76B /* Main.html in Resources */ = {isa = PBXBuildFile; fileRef = B5E6E79F2AB20D7700D7B76B /* Main.html */; };
+               B5E6E7A32AB20D7700D7B76B /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = B5E6E7A22AB20D7700D7B76B /* Icon.png */; };
+               B5E6E7A52AB20D7700D7B76B /* Style.css in Resources */ = {isa = PBXBuildFile; fileRef = B5E6E7A42AB20D7700D7B76B /* Style.css */; };
+               B5E6E7A72AB20D7700D7B76B /* Script.js in Resources */ = {isa = PBXBuildFile; fileRef = B5E6E7A62AB20D7700D7B76B /* Script.js */; };
+               B5E6E7A92AB20D7700D7B76B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E6E7A82AB20D7700D7B76B /* ViewController.swift */; };
+               B5E6E7AC2AB20D7700D7B76B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5E6E7AA2AB20D7700D7B76B /* Main.storyboard */; };
+               B5E6E7AE2AB20D7800D7B76B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5E6E7AD2AB20D7800D7B76B /* Assets.xcassets */; };
+               B5E6E7BA2AB20D7800D7B76B /* JunctionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E6E7B92AB20D7800D7B76B /* JunctionTests.swift */; };
+               B5E6E7C42AB20D7800D7B76B /* JunctionUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E6E7C32AB20D7800D7B76B /* JunctionUITests.swift */; };
+               B5E6E7C62AB20D7800D7B76B /* JunctionUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E6E7C52AB20D7800D7B76B /* JunctionUITestsLaunchTests.swift */; };
+               B5E6E7CC2AB20D7800D7B76B /* Junction Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = B5E6E7CB2AB20D7800D7B76B /* Junction Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+               B5E6E7D12AB20D7800D7B76B /* SafariWebExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E6E7D02AB20D7800D7B76B /* SafariWebExtensionHandler.swift */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+               B5E6E7B62AB20D7800D7B76B /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = B5E6E7912AB20D7700D7B76B /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = B5E6E7982AB20D7700D7B76B;
+                       remoteInfo = Junction;
+               };
+               B5E6E7C02AB20D7800D7B76B /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = B5E6E7912AB20D7700D7B76B /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = B5E6E7982AB20D7700D7B76B;
+                       remoteInfo = Junction;
+               };
+               B5E6E7CD2AB20D7800D7B76B /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = B5E6E7912AB20D7700D7B76B /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = B5E6E7CA2AB20D7800D7B76B;
+                       remoteInfo = "Junction Extension";
+               };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+               B5E6E7EA2AB20D7800D7B76B /* Embed Foundation Extensions */ = {
+                       isa = PBXCopyFilesBuildPhase;
+                       buildActionMask = 2147483647;
+                       dstPath = "";
+                       dstSubfolderSpec = 13;
+                       files = (
+                               B5E6E7CC2AB20D7800D7B76B /* Junction Extension.appex in Embed Foundation Extensions */,
+                       );
+                       name = "Embed Foundation Extensions";
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+               B541F6312AB20E1F00A08651 /* junction.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = junction.js; path = ../../../extension/junction.js; sourceTree = "<group>"; };
+               B541F6322AB20E1F00A08651 /* icons */ = {isa = PBXFileReference; lastKnownFileType = folder; name = icons; path = ../../../extension/icons; sourceTree = "<group>"; };
+               B541F6332AB20E1F00A08651 /* sounds */ = {isa = PBXFileReference; lastKnownFileType = folder; name = sounds; path = ../../../extension/sounds; sourceTree = "<group>"; };
+               B541F6342AB20E1F00A08651 /* manifest.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = manifest.json; path = ../../../extension/manifest.json; sourceTree = "<group>"; };
+               B578364F2AB21406006488FE /* build */ = {isa = PBXFileReference; lastKnownFileType = folder; name = build; path = ../../../extension/build; sourceTree = "<group>"; };
+               B5E6E7992AB20D7700D7B76B /* Junction.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Junction.app; sourceTree = BUILT_PRODUCTS_DIR; };
+               B5E6E79C2AB20D7700D7B76B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
+               B5E6E7A02AB20D7700D7B76B /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = Base; path = ../Base.lproj/Main.html; sourceTree = "<group>"; };
+               B5E6E7A22AB20D7700D7B76B /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
+               B5E6E7A42AB20D7700D7B76B /* Style.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = Style.css; sourceTree = "<group>"; };
+               B5E6E7A62AB20D7700D7B76B /* Script.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = Script.js; sourceTree = "<group>"; };
+               B5E6E7A82AB20D7700D7B76B /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
+               B5E6E7AB2AB20D7700D7B76B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+               B5E6E7AD2AB20D7800D7B76B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+               B5E6E7AF2AB20D7800D7B76B /* Junction.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Junction.entitlements; sourceTree = "<group>"; };
+               B5E6E7B02AB20D7800D7B76B /* Junction.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Junction.entitlements; sourceTree = "<group>"; };
+               B5E6E7B52AB20D7800D7B76B /* JunctionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JunctionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+               B5E6E7B92AB20D7800D7B76B /* JunctionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JunctionTests.swift; sourceTree = "<group>"; };
+               B5E6E7BF2AB20D7800D7B76B /* JunctionUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = JunctionUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+               B5E6E7C32AB20D7800D7B76B /* JunctionUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JunctionUITests.swift; sourceTree = "<group>"; };
+               B5E6E7C52AB20D7800D7B76B /* JunctionUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JunctionUITestsLaunchTests.swift; sourceTree = "<group>"; };
+               B5E6E7CB2AB20D7800D7B76B /* Junction Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Junction Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
+               B5E6E7D02AB20D7800D7B76B /* SafariWebExtensionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafariWebExtensionHandler.swift; sourceTree = "<group>"; };
+               B5E6E7E32AB20D7800D7B76B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+               B5E6E7E42AB20D7800D7B76B /* Junction_Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Junction_Extension.entitlements; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               B5E6E7962AB20D7700D7B76B /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               B5E6E7B22AB20D7800D7B76B /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               B5E6E7BC2AB20D7800D7B76B /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               B5E6E7C82AB20D7800D7B76B /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               B5E6E7902AB20D7700D7B76B = {
+                       isa = PBXGroup;
+                       children = (
+                               B5E6E79B2AB20D7700D7B76B /* Junction */,
+                               B5E6E7B82AB20D7800D7B76B /* JunctionTests */,
+                               B5E6E7C22AB20D7800D7B76B /* JunctionUITests */,
+                               B5E6E7CF2AB20D7800D7B76B /* Junction Extension */,
+                               B5E6E79A2AB20D7700D7B76B /* Products */,
+                       );
+                       sourceTree = "<group>";
+               };
+               B5E6E79A2AB20D7700D7B76B /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B5E6E7992AB20D7700D7B76B /* Junction.app */,
+                               B5E6E7B52AB20D7800D7B76B /* JunctionTests.xctest */,
+                               B5E6E7BF2AB20D7800D7B76B /* JunctionUITests.xctest */,
+                               B5E6E7CB2AB20D7800D7B76B /* Junction Extension.appex */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               B5E6E79B2AB20D7700D7B76B /* Junction */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B5E6E79C2AB20D7700D7B76B /* AppDelegate.swift */,
+                               B5E6E7A82AB20D7700D7B76B /* ViewController.swift */,
+                               B5E6E7AA2AB20D7700D7B76B /* Main.storyboard */,
+                               B5E6E7AD2AB20D7800D7B76B /* Assets.xcassets */,
+                               B5E6E7AF2AB20D7800D7B76B /* Junction.entitlements */,
+                               B5E6E7B02AB20D7800D7B76B /* Junction.entitlements */,
+                               B5E6E79E2AB20D7700D7B76B /* Resources */,
+                       );
+                       path = Junction;
+                       sourceTree = "<group>";
+               };
+               B5E6E79E2AB20D7700D7B76B /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B5E6E79F2AB20D7700D7B76B /* Main.html */,
+                               B5E6E7A22AB20D7700D7B76B /* Icon.png */,
+                               B5E6E7A42AB20D7700D7B76B /* Style.css */,
+                               B5E6E7A62AB20D7700D7B76B /* Script.js */,
+                       );
+                       path = Resources;
+                       sourceTree = "<group>";
+               };
+               B5E6E7B82AB20D7800D7B76B /* JunctionTests */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B5E6E7B92AB20D7800D7B76B /* JunctionTests.swift */,
+                       );
+                       path = JunctionTests;
+                       sourceTree = "<group>";
+               };
+               B5E6E7C22AB20D7800D7B76B /* JunctionUITests */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B5E6E7C32AB20D7800D7B76B /* JunctionUITests.swift */,
+                               B5E6E7C52AB20D7800D7B76B /* JunctionUITestsLaunchTests.swift */,
+                       );
+                       path = JunctionUITests;
+                       sourceTree = "<group>";
+               };
+               B5E6E7CF2AB20D7800D7B76B /* Junction Extension */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B5E6E7D02AB20D7800D7B76B /* SafariWebExtensionHandler.swift */,
+                               B5E6E7E32AB20D7800D7B76B /* Info.plist */,
+                               B5E6E7E42AB20D7800D7B76B /* Junction_Extension.entitlements */,
+                               B5E6E7D22AB20D7800D7B76B /* Resources */,
+                       );
+                       path = "Junction Extension";
+                       sourceTree = "<group>";
+               };
+               B5E6E7D22AB20D7800D7B76B /* Resources */ = {
+                       isa = PBXGroup;
+                       children = (
+                               B578364F2AB21406006488FE /* build */,
+                               B541F6322AB20E1F00A08651 /* icons */,
+                               B541F6312AB20E1F00A08651 /* junction.js */,
+                               B541F6342AB20E1F00A08651 /* manifest.json */,
+                               B541F6332AB20E1F00A08651 /* sounds */,
+                       );
+                       path = Resources;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+               B5E6E7982AB20D7700D7B76B /* Junction */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = B5E6E7EB2AB20D7800D7B76B /* Build configuration list for PBXNativeTarget "Junction" */;
+                       buildPhases = (
+                               B5E6E7952AB20D7700D7B76B /* Sources */,
+                               B5E6E7962AB20D7700D7B76B /* Frameworks */,
+                               B5E6E7972AB20D7700D7B76B /* Resources */,
+                               B5E6E7EA2AB20D7800D7B76B /* Embed Foundation Extensions */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               B5E6E7CE2AB20D7800D7B76B /* PBXTargetDependency */,
+                       );
+                       name = Junction;
+                       productName = Junction;
+                       productReference = B5E6E7992AB20D7700D7B76B /* Junction.app */;
+                       productType = "com.apple.product-type.application";
+               };
+               B5E6E7B42AB20D7800D7B76B /* JunctionTests */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = B5E6E7EE2AB20D7800D7B76B /* Build configuration list for PBXNativeTarget "JunctionTests" */;
+                       buildPhases = (
+                               B5E6E7B12AB20D7800D7B76B /* Sources */,
+                               B5E6E7B22AB20D7800D7B76B /* Frameworks */,
+                               B5E6E7B32AB20D7800D7B76B /* Resources */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               B5E6E7B72AB20D7800D7B76B /* PBXTargetDependency */,
+                       );
+                       name = JunctionTests;
+                       productName = JunctionTests;
+                       productReference = B5E6E7B52AB20D7800D7B76B /* JunctionTests.xctest */;
+                       productType = "com.apple.product-type.bundle.unit-test";
+               };
+               B5E6E7BE2AB20D7800D7B76B /* JunctionUITests */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = B5E6E7F12AB20D7800D7B76B /* Build configuration list for PBXNativeTarget "JunctionUITests" */;
+                       buildPhases = (
+                               B5E6E7BB2AB20D7800D7B76B /* Sources */,
+                               B5E6E7BC2AB20D7800D7B76B /* Frameworks */,
+                               B5E6E7BD2AB20D7800D7B76B /* Resources */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               B5E6E7C12AB20D7800D7B76B /* PBXTargetDependency */,
+                       );
+                       name = JunctionUITests;
+                       productName = JunctionUITests;
+                       productReference = B5E6E7BF2AB20D7800D7B76B /* JunctionUITests.xctest */;
+                       productType = "com.apple.product-type.bundle.ui-testing";
+               };
+               B5E6E7CA2AB20D7800D7B76B /* Junction Extension */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = B5E6E7E72AB20D7800D7B76B /* Build configuration list for PBXNativeTarget "Junction Extension" */;
+                       buildPhases = (
+                               B5E6E7C72AB20D7800D7B76B /* Sources */,
+                               B5E6E7C82AB20D7800D7B76B /* Frameworks */,
+                               B5E6E7C92AB20D7800D7B76B /* Resources */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = "Junction Extension";
+                       productName = "Junction Extension";
+                       productReference = B5E6E7CB2AB20D7800D7B76B /* Junction Extension.appex */;
+                       productType = "com.apple.product-type.app-extension";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               B5E6E7912AB20D7700D7B76B /* Project object */ = {
+                       isa = PBXProject;
+                       attributes = {
+                               BuildIndependentTargetsInParallel = 1;
+                               LastSwiftUpdateCheck = 1500;
+                               LastUpgradeCheck = 1500;
+                               TargetAttributes = {
+                                       B5E6E7982AB20D7700D7B76B = {
+                                               CreatedOnToolsVersion = 15.0;
+                                       };
+                                       B5E6E7B42AB20D7800D7B76B = {
+                                               CreatedOnToolsVersion = 15.0;
+                                               TestTargetID = B5E6E7982AB20D7700D7B76B;
+                                       };
+                                       B5E6E7BE2AB20D7800D7B76B = {
+                                               CreatedOnToolsVersion = 15.0;
+                                               TestTargetID = B5E6E7982AB20D7700D7B76B;
+                                       };
+                                       B5E6E7CA2AB20D7800D7B76B = {
+                                               CreatedOnToolsVersion = 15.0;
+                                       };
+                               };
+                       };
+                       buildConfigurationList = B5E6E7942AB20D7700D7B76B /* Build configuration list for PBXProject "Junction" */;
+                       compatibilityVersion = "Xcode 14.0";
+                       developmentRegion = en;
+                       hasScannedForEncodings = 0;
+                       knownRegions = (
+                               en,
+                               Base,
+                       );
+                       mainGroup = B5E6E7902AB20D7700D7B76B;
+                       productRefGroup = B5E6E79A2AB20D7700D7B76B /* Products */;
+                       projectDirPath = "";
+                       projectRoot = "";
+                       targets = (
+                               B5E6E7982AB20D7700D7B76B /* Junction */,
+                               B5E6E7B42AB20D7800D7B76B /* JunctionTests */,
+                               B5E6E7BE2AB20D7800D7B76B /* JunctionUITests */,
+                               B5E6E7CA2AB20D7800D7B76B /* Junction Extension */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+               B5E6E7972AB20D7700D7B76B /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               B5E6E7A32AB20D7700D7B76B /* Icon.png in Resources */,
+                               B5E6E7AC2AB20D7700D7B76B /* Main.storyboard in Resources */,
+                               B5E6E7A72AB20D7700D7B76B /* Script.js in Resources */,
+                               B5E6E7A12AB20D7700D7B76B /* Main.html in Resources */,
+                               B5E6E7AE2AB20D7800D7B76B /* Assets.xcassets in Resources */,
+                               B5E6E7A52AB20D7700D7B76B /* Style.css in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               B5E6E7B32AB20D7800D7B76B /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               B5E6E7BD2AB20D7800D7B76B /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               B5E6E7C92AB20D7800D7B76B /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               B57836502AB21406006488FE /* build in Resources */,
+                               B541F6362AB20E2000A08651 /* icons in Resources */,
+                               B541F6352AB20E2000A08651 /* junction.js in Resources */,
+                               B541F6382AB20E2000A08651 /* manifest.json in Resources */,
+                               B541F6372AB20E2000A08651 /* sounds in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+               B5E6E7952AB20D7700D7B76B /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               B5E6E7A92AB20D7700D7B76B /* ViewController.swift in Sources */,
+                               B5E6E79D2AB20D7700D7B76B /* AppDelegate.swift in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               B5E6E7B12AB20D7800D7B76B /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               B5E6E7BA2AB20D7800D7B76B /* JunctionTests.swift in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               B5E6E7BB2AB20D7800D7B76B /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               B5E6E7C62AB20D7800D7B76B /* JunctionUITestsLaunchTests.swift in Sources */,
+                               B5E6E7C42AB20D7800D7B76B /* JunctionUITests.swift in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               B5E6E7C72AB20D7800D7B76B /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               B5E6E7D12AB20D7800D7B76B /* SafariWebExtensionHandler.swift in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+               B5E6E7B72AB20D7800D7B76B /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = B5E6E7982AB20D7700D7B76B /* Junction */;
+                       targetProxy = B5E6E7B62AB20D7800D7B76B /* PBXContainerItemProxy */;
+               };
+               B5E6E7C12AB20D7800D7B76B /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = B5E6E7982AB20D7700D7B76B /* Junction */;
+                       targetProxy = B5E6E7C02AB20D7800D7B76B /* PBXContainerItemProxy */;
+               };
+               B5E6E7CE2AB20D7800D7B76B /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = B5E6E7CA2AB20D7800D7B76B /* Junction Extension */;
+                       targetProxy = B5E6E7CD2AB20D7800D7B76B /* PBXContainerItemProxy */;
+               };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+               B5E6E79F2AB20D7700D7B76B /* Main.html */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               B5E6E7A02AB20D7700D7B76B /* Base */,
+                       );
+                       name = Main.html;
+                       sourceTree = "<group>";
+               };
+               B5E6E7AA2AB20D7700D7B76B /* Main.storyboard */ = {
+                       isa = PBXVariantGroup;
+                       children = (
+                               B5E6E7AB2AB20D7700D7B76B /* Base */,
+                       );
+                       name = Main.storyboard;
+                       sourceTree = "<group>";
+               };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+               B5E6E7E52AB20D7800D7B76B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+                               CLANG_ANALYZER_NONNULL = YES;
+                               CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+                               CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+                               CLANG_ENABLE_MODULES = YES;
+                               CLANG_ENABLE_OBJC_ARC = YES;
+                               CLANG_ENABLE_OBJC_WEAK = YES;
+                               CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+                               CLANG_WARN_BOOL_CONVERSION = YES;
+                               CLANG_WARN_COMMA = YES;
+                               CLANG_WARN_CONSTANT_CONVERSION = YES;
+                               CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+                               CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+                               CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+                               CLANG_WARN_EMPTY_BODY = YES;
+                               CLANG_WARN_ENUM_CONVERSION = YES;
+                               CLANG_WARN_INFINITE_RECURSION = YES;
+                               CLANG_WARN_INT_CONVERSION = YES;
+                               CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+                               CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+                               CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+                               CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+                               CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+                               CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+                               CLANG_WARN_STRICT_PROTOTYPES = YES;
+                               CLANG_WARN_SUSPICIOUS_MOVE = YES;
+                               CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+                               CLANG_WARN_UNREACHABLE_CODE = YES;
+                               CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+                               COPY_PHASE_STRIP = NO;
+                               DEBUG_INFORMATION_FORMAT = dwarf;
+                               ENABLE_STRICT_OBJC_MSGSEND = YES;
+                               ENABLE_TESTABILITY = YES;
+                               ENABLE_USER_SCRIPT_SANDBOXING = YES;
+                               GCC_C_LANGUAGE_STANDARD = gnu17;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_NO_COMMON_BLOCKS = YES;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               GCC_PREPROCESSOR_DEFINITIONS = (
+                                       "DEBUG=1",
+                                       "$(inherited)",
+                               );
+                               GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+                               GCC_WARN_UNDECLARED_SELECTOR = YES;
+                               GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+                               GCC_WARN_UNUSED_FUNCTION = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 14.0;
+                               MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+                               MTL_FAST_MATH = YES;
+                               ONLY_ACTIVE_ARCH = YES;
+                               SDKROOT = macosx;
+                               SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
+                               SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+                       };
+                       name = Debug;
+               };
+               B5E6E7E62AB20D7800D7B76B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+                               CLANG_ANALYZER_NONNULL = YES;
+                               CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+                               CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+                               CLANG_ENABLE_MODULES = YES;
+                               CLANG_ENABLE_OBJC_ARC = YES;
+                               CLANG_ENABLE_OBJC_WEAK = YES;
+                               CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+                               CLANG_WARN_BOOL_CONVERSION = YES;
+                               CLANG_WARN_COMMA = YES;
+                               CLANG_WARN_CONSTANT_CONVERSION = YES;
+                               CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+                               CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+                               CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+                               CLANG_WARN_EMPTY_BODY = YES;
+                               CLANG_WARN_ENUM_CONVERSION = YES;
+                               CLANG_WARN_INFINITE_RECURSION = YES;
+                               CLANG_WARN_INT_CONVERSION = YES;
+                               CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+                               CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+                               CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+                               CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+                               CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+                               CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+                               CLANG_WARN_STRICT_PROTOTYPES = YES;
+                               CLANG_WARN_SUSPICIOUS_MOVE = YES;
+                               CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+                               CLANG_WARN_UNREACHABLE_CODE = YES;
+                               CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+                               COPY_PHASE_STRIP = NO;
+                               DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+                               ENABLE_NS_ASSERTIONS = NO;
+                               ENABLE_STRICT_OBJC_MSGSEND = YES;
+                               ENABLE_USER_SCRIPT_SANDBOXING = YES;
+                               GCC_C_LANGUAGE_STANDARD = gnu17;
+                               GCC_NO_COMMON_BLOCKS = YES;
+                               GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+                               GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+                               GCC_WARN_UNDECLARED_SELECTOR = YES;
+                               GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+                               GCC_WARN_UNUSED_FUNCTION = YES;
+                               GCC_WARN_UNUSED_VARIABLE = YES;
+                               LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 14.0;
+                               MTL_ENABLE_DEBUG_INFO = NO;
+                               MTL_FAST_MATH = YES;
+                               SDKROOT = macosx;
+                               SWIFT_COMPILATION_MODE = wholemodule;
+                       };
+                       name = Release;
+               };
+               B5E6E7E82AB20D7800D7B76B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CODE_SIGN_ENTITLEMENTS = "Junction Extension/Junction_Extension.entitlements";
+                               CODE_SIGN_STYLE = Automatic;
+                               CURRENT_PROJECT_VERSION = 1;
+                               DEVELOPMENT_TEAM = S68NHQVJXW;
+                               ENABLE_HARDENED_RUNTIME = YES;
+                               GENERATE_INFOPLIST_FILE = YES;
+                               INFOPLIST_FILE = "Junction Extension/Info.plist";
+                               INFOPLIST_KEY_CFBundleDisplayName = "Junction Extension";
+                               INFOPLIST_KEY_NSHumanReadableCopyright = "";
+                               LD_RUNPATH_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "@executable_path/../Frameworks",
+                                       "@executable_path/../../../../Frameworks",
+                               );
+                               MACOSX_DEPLOYMENT_TARGET = 10.14;
+                               MARKETING_VERSION = 1.0;
+                               OTHER_LDFLAGS = (
+                                       "-framework",
+                                       SafariServices,
+                               );
+                               PRODUCT_BUNDLE_IDENTIFIER = systems.tranquil.Junction.Extension;
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               SKIP_INSTALL = YES;
+                               SWIFT_EMIT_LOC_STRINGS = YES;
+                               SWIFT_VERSION = 5.0;
+                       };
+                       name = Debug;
+               };
+               B5E6E7E92AB20D7800D7B76B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               CODE_SIGN_ENTITLEMENTS = "Junction Extension/Junction_Extension.entitlements";
+                               CODE_SIGN_STYLE = Automatic;
+                               CURRENT_PROJECT_VERSION = 1;
+                               DEVELOPMENT_TEAM = S68NHQVJXW;
+                               ENABLE_HARDENED_RUNTIME = YES;
+                               GENERATE_INFOPLIST_FILE = YES;
+                               INFOPLIST_FILE = "Junction Extension/Info.plist";
+                               INFOPLIST_KEY_CFBundleDisplayName = "Junction Extension";
+                               INFOPLIST_KEY_NSHumanReadableCopyright = "";
+                               LD_RUNPATH_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "@executable_path/../Frameworks",
+                                       "@executable_path/../../../../Frameworks",
+                               );
+                               MACOSX_DEPLOYMENT_TARGET = 10.14;
+                               MARKETING_VERSION = 1.0;
+                               OTHER_LDFLAGS = (
+                                       "-framework",
+                                       SafariServices,
+                               );
+                               PRODUCT_BUNDLE_IDENTIFIER = systems.tranquil.Junction.Extension;
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               SKIP_INSTALL = YES;
+                               SWIFT_EMIT_LOC_STRINGS = YES;
+                               SWIFT_VERSION = 5.0;
+                       };
+                       name = Release;
+               };
+               B5E6E7EC2AB20D7800D7B76B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+                               ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+                               ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+                               CODE_SIGN_ENTITLEMENTS = Junction/Junction.entitlements;
+                               CODE_SIGN_STYLE = Automatic;
+                               COMBINE_HIDPI_IMAGES = YES;
+                               CURRENT_PROJECT_VERSION = 1;
+                               DEVELOPMENT_TEAM = S68NHQVJXW;
+                               ENABLE_HARDENED_RUNTIME = YES;
+                               GENERATE_INFOPLIST_FILE = YES;
+                               INFOPLIST_KEY_CFBundleDisplayName = Junction;
+                               INFOPLIST_KEY_NSHumanReadableCopyright = "";
+                               INFOPLIST_KEY_NSMainStoryboardFile = Main;
+                               INFOPLIST_KEY_NSPrincipalClass = NSApplication;
+                               LD_RUNPATH_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "@executable_path/../Frameworks",
+                               );
+                               MACOSX_DEPLOYMENT_TARGET = 10.14;
+                               MARKETING_VERSION = 1.0;
+                               OTHER_LDFLAGS = (
+                                       "-framework",
+                                       SafariServices,
+                                       "-framework",
+                                       WebKit,
+                               );
+                               PRODUCT_BUNDLE_IDENTIFIER = systems.tranquil.Junction;
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               SWIFT_EMIT_LOC_STRINGS = YES;
+                               SWIFT_VERSION = 5.0;
+                       };
+                       name = Debug;
+               };
+               B5E6E7ED2AB20D7800D7B76B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+                               ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+                               ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+                               CODE_SIGN_ENTITLEMENTS = Junction/Junction.entitlements;
+                               CODE_SIGN_STYLE = Automatic;
+                               COMBINE_HIDPI_IMAGES = YES;
+                               CURRENT_PROJECT_VERSION = 1;
+                               DEVELOPMENT_TEAM = S68NHQVJXW;
+                               ENABLE_HARDENED_RUNTIME = YES;
+                               GENERATE_INFOPLIST_FILE = YES;
+                               INFOPLIST_KEY_CFBundleDisplayName = Junction;
+                               INFOPLIST_KEY_NSHumanReadableCopyright = "";
+                               INFOPLIST_KEY_NSMainStoryboardFile = Main;
+                               INFOPLIST_KEY_NSPrincipalClass = NSApplication;
+                               LD_RUNPATH_SEARCH_PATHS = (
+                                       "$(inherited)",
+                                       "@executable_path/../Frameworks",
+                               );
+                               MACOSX_DEPLOYMENT_TARGET = 10.14;
+                               MARKETING_VERSION = 1.0;
+                               OTHER_LDFLAGS = (
+                                       "-framework",
+                                       SafariServices,
+                                       "-framework",
+                                       WebKit,
+                               );
+                               PRODUCT_BUNDLE_IDENTIFIER = systems.tranquil.Junction;
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               SWIFT_EMIT_LOC_STRINGS = YES;
+                               SWIFT_VERSION = 5.0;
+                       };
+                       name = Release;
+               };
+               B5E6E7EF2AB20D7800D7B76B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+                               BUNDLE_LOADER = "$(TEST_HOST)";
+                               CODE_SIGN_STYLE = Automatic;
+                               CURRENT_PROJECT_VERSION = 1;
+                               DEVELOPMENT_TEAM = S68NHQVJXW;
+                               GENERATE_INFOPLIST_FILE = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 10.14;
+                               MARKETING_VERSION = 1.0;
+                               PRODUCT_BUNDLE_IDENTIFIER = systems.tranquil.JunctionTests;
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               SWIFT_EMIT_LOC_STRINGS = NO;
+                               SWIFT_VERSION = 5.0;
+                               TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Junction.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Junction";
+                       };
+                       name = Debug;
+               };
+               B5E6E7F02AB20D7800D7B76B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+                               BUNDLE_LOADER = "$(TEST_HOST)";
+                               CODE_SIGN_STYLE = Automatic;
+                               CURRENT_PROJECT_VERSION = 1;
+                               DEVELOPMENT_TEAM = S68NHQVJXW;
+                               GENERATE_INFOPLIST_FILE = YES;
+                               MACOSX_DEPLOYMENT_TARGET = 10.14;
+                               MARKETING_VERSION = 1.0;
+                               PRODUCT_BUNDLE_IDENTIFIER = systems.tranquil.JunctionTests;
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               SWIFT_EMIT_LOC_STRINGS = NO;
+                               SWIFT_VERSION = 5.0;
+                               TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Junction.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Junction";
+                       };
+                       name = Release;
+               };
+               B5E6E7F22AB20D7800D7B76B /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+                               CODE_SIGN_STYLE = Automatic;
+                               CURRENT_PROJECT_VERSION = 1;
+                               DEVELOPMENT_TEAM = S68NHQVJXW;
+                               GENERATE_INFOPLIST_FILE = YES;
+                               MARKETING_VERSION = 1.0;
+                               PRODUCT_BUNDLE_IDENTIFIER = systems.tranquil.JunctionUITests;
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               SWIFT_EMIT_LOC_STRINGS = NO;
+                               SWIFT_VERSION = 5.0;
+                               TEST_TARGET_NAME = Junction;
+                       };
+                       name = Debug;
+               };
+               B5E6E7F32AB20D7800D7B76B /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
+                               CODE_SIGN_STYLE = Automatic;
+                               CURRENT_PROJECT_VERSION = 1;
+                               DEVELOPMENT_TEAM = S68NHQVJXW;
+                               GENERATE_INFOPLIST_FILE = YES;
+                               MARKETING_VERSION = 1.0;
+                               PRODUCT_BUNDLE_IDENTIFIER = systems.tranquil.JunctionUITests;
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                               SWIFT_EMIT_LOC_STRINGS = NO;
+                               SWIFT_VERSION = 5.0;
+                               TEST_TARGET_NAME = Junction;
+                       };
+                       name = Release;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               B5E6E7942AB20D7700D7B76B /* Build configuration list for PBXProject "Junction" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               B5E6E7E52AB20D7800D7B76B /* Debug */,
+                               B5E6E7E62AB20D7800D7B76B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               B5E6E7E72AB20D7800D7B76B /* Build configuration list for PBXNativeTarget "Junction Extension" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               B5E6E7E82AB20D7800D7B76B /* Debug */,
+                               B5E6E7E92AB20D7800D7B76B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               B5E6E7EB2AB20D7800D7B76B /* Build configuration list for PBXNativeTarget "Junction" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               B5E6E7EC2AB20D7800D7B76B /* Debug */,
+                               B5E6E7ED2AB20D7800D7B76B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               B5E6E7EE2AB20D7800D7B76B /* Build configuration list for PBXNativeTarget "JunctionTests" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               B5E6E7EF2AB20D7800D7B76B /* Debug */,
+                               B5E6E7F02AB20D7800D7B76B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               B5E6E7F12AB20D7800D7B76B /* Build configuration list for PBXNativeTarget "JunctionUITests" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               B5E6E7F22AB20D7800D7B76B /* Debug */,
+                               B5E6E7F32AB20D7800D7B76B /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = B5E6E7912AB20D7700D7B76B /* Project object */;
+}
diff --git a/safari/Junction.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/safari/Junction.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644 (file)
index 0000000..919434a
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>
diff --git a/safari/Junction.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/safari/Junction.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644 (file)
index 0000000..18d9810
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>IDEDidComputeMac32BitWarning</key>
+       <true/>
+</dict>
+</plist>
diff --git a/safari/Junction.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate b/safari/Junction.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644 (file)
index 0000000..9acc744
Binary files /dev/null and b/safari/Junction.xcodeproj/project.xcworkspace/xcuserdata/rbdr.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/safari/Junction.xcodeproj/xcuserdata/rbdr.xcuserdatad/xcschemes/xcschememanagement.plist b/safari/Junction.xcodeproj/xcuserdata/rbdr.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644 (file)
index 0000000..72da880
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>SchemeUserState</key>
+       <dict>
+               <key>Junction.xcscheme_^#shared#^_</key>
+               <dict>
+                       <key>orderHint</key>
+                       <integer>0</integer>
+               </dict>
+       </dict>
+</dict>
+</plist>
diff --git a/safari/Junction/AppDelegate.swift b/safari/Junction/AppDelegate.swift
new file mode 100644 (file)
index 0000000..0e990a0
--- /dev/null
@@ -0,0 +1,21 @@
+//
+//  AppDelegate.swift
+//  Junction
+//
+//  Created by Ruben Beltran del Rio on 9/13/23.
+//
+
+import Cocoa
+
+@main
+class AppDelegate: NSObject, NSApplicationDelegate {
+
+    func applicationDidFinishLaunching(_ notification: Notification) {
+        // Override point for customization after application launch.
+    }
+
+    func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
+        return true
+    }
+
+}
diff --git a/safari/Junction/Assets.xcassets/AccentColor.colorset/Contents.json b/safari/Junction/Assets.xcassets/AccentColor.colorset/Contents.json
new file mode 100644 (file)
index 0000000..eb87897
--- /dev/null
@@ -0,0 +1,11 @@
+{
+  "colors" : [
+    {
+      "idiom" : "universal"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/Contents.json b/safari/Junction/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644 (file)
index 0000000..64dc11e
--- /dev/null
@@ -0,0 +1,68 @@
+{
+  "images" : [
+    {
+      "filename" : "icon_16x16.png",
+      "idiom" : "mac",
+      "scale" : "1x",
+      "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@2x.png",
+      "idiom" : "mac",
+      "scale" : "2x",
+      "size" : "32x32"
+    },
+    {
+      "filename" : "icon_128x128.png",
+      "idiom" : "mac",
+      "scale" : "1x",
+      "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@2x.png",
+      "idiom" : "mac",
+      "scale" : "2x",
+      "size" : "256x256"
+    },
+    {
+      "filename" : "icon_512x512.png",
+      "idiom" : "mac",
+      "scale" : "1x",
+      "size" : "512x512"
+    },
+    {
+      "filename" : "icon_512x512@2x.png",
+      "idiom" : "mac",
+      "scale" : "2x",
+      "size" : "512x512"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_128x128.png b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_128x128.png
new file mode 100644 (file)
index 0000000..0bcb999
Binary files /dev/null and b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_128x128.png differ
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png
new file mode 100644 (file)
index 0000000..a45aa17
Binary files /dev/null and b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png differ
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_16x16.png b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_16x16.png
new file mode 100644 (file)
index 0000000..737d986
Binary files /dev/null and b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_16x16.png differ
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png
new file mode 100644 (file)
index 0000000..b748f7b
Binary files /dev/null and b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png differ
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_256x256.png b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_256x256.png
new file mode 100644 (file)
index 0000000..59d8be3
Binary files /dev/null and b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_256x256.png differ
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png
new file mode 100644 (file)
index 0000000..2f37b07
Binary files /dev/null and b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png differ
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_32x32.png b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_32x32.png
new file mode 100644 (file)
index 0000000..b748f7b
Binary files /dev/null and b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_32x32.png differ
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png
new file mode 100644 (file)
index 0000000..b0cf195
Binary files /dev/null and b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png differ
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_512x512.png b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_512x512.png
new file mode 100644 (file)
index 0000000..2f37b07
Binary files /dev/null and b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_512x512.png differ
diff --git a/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png
new file mode 100644 (file)
index 0000000..f056447
Binary files /dev/null and b/safari/Junction/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png differ
diff --git a/safari/Junction/Assets.xcassets/Contents.json b/safari/Junction/Assets.xcassets/Contents.json
new file mode 100644 (file)
index 0000000..73c0059
--- /dev/null
@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
diff --git a/safari/Junction/Assets.xcassets/LargeIcon.imageset/Contents.json b/safari/Junction/Assets.xcassets/LargeIcon.imageset/Contents.json
new file mode 100644 (file)
index 0000000..a19a549
--- /dev/null
@@ -0,0 +1,20 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
diff --git a/safari/Junction/Base.lproj/Main.html b/safari/Junction/Base.lproj/Main.html
new file mode 100644 (file)
index 0000000..081cc41
--- /dev/null
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <meta http-equiv="Content-Security-Policy" content="default-src 'self'">
+
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+
+    <link rel="stylesheet" href="../Style.css">
+    <script src="../Script.js" defer></script>
+</head>
+<body>
+    <img src="../Icon.png" width="128" height="128" alt="Junction Icon">
+    <p class="state-unknown">You can turn on Junction’s extension in Safari Extensions preferences.</p>
+    <p class="state-on">Junction’s extension is currently on. You can turn it off in Safari Extensions preferences.</p>
+    <p class="state-off">Junction’s extension is currently off. You can turn it on in Safari Extensions preferences.</p>
+    <button class="open-preferences">Quit and Open Safari Extensions Preferences…</button>
+</body>
+</html>
diff --git a/safari/Junction/Base.lproj/Main.storyboard b/safari/Junction/Base.lproj/Main.storyboard
new file mode 100644 (file)
index 0000000..6de6cf1
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19085" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19085"/>
+        <plugIn identifier="com.apple.WebKit2IBPlugin" version="19085"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Application-->
+        <scene sceneID="JPo-4y-FX3">
+            <objects>
+                <application id="hnw-xV-0zn" sceneMemberID="viewController">
+                    <menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
+                        <items>
+                            <menuItem title="Junction" id="1Xt-HY-uBw">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <menu key="submenu" title="Junction" systemMenu="apple" id="uQy-DD-JDr">
+                                    <items>
+                                        <menuItem title="About Junction" id="5kV-Vb-QxS">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
+                                        <menuItem title="Hide Junction" keyEquivalent="h" id="Olw-nP-bQN">
+                                            <connections>
+                                                <action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
+                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                            <connections>
+                                                <action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Show All" id="Kd2-mp-pUS">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
+                                        <menuItem title="Quit Junction" keyEquivalent="q" id="4sb-4s-VLi">
+                                            <connections>
+                                                <action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                            <menuItem title="Help" id="wpr-3q-Mcd">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
+                                    <items>
+                                        <menuItem title="Junction Help" keyEquivalent="?" id="FKE-Sm-Kum">
+                                            <connections>
+                                                <action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                        </items>
+                    </menu>
+                    <connections>
+                        <outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
+                    </connections>
+                </application>
+                <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModuleProvider="target"/>
+                <customObject id="YLy-65-1bz" customClass="NSFontManager"/>
+                <customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="76" y="-134"/>
+        </scene>
+        <!--Window Controller-->
+        <scene sceneID="R2V-B0-nI4">
+            <objects>
+                <windowController showSeguePresentationStyle="single" id="B8D-0N-5wS" sceneMemberID="viewController">
+                    <window key="window" title="Junction" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" animationBehavior="default" id="IQv-IB-iLA">
+                        <windowStyleMask key="styleMask" titled="YES" closable="YES"/>
+                        <windowCollectionBehavior key="collectionBehavior" fullScreenNone="YES"/>
+                        <rect key="contentRect" x="196" y="240" width="425" height="325"/>
+                        <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
+                        <connections>
+                            <outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
+                        </connections>
+                    </window>
+                    <connections>
+                        <segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
+                    </connections>
+                </windowController>
+                <customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="75" y="250"/>
+        </scene>
+        <!--View Controller-->
+        <scene sceneID="hIz-AP-VOD">
+            <objects>
+                <viewController id="XfG-lQ-9wD" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
+                    <view key="view" id="m2S-Jp-Qdl">
+                        <rect key="frame" x="0.0" y="0.0" width="425" height="325"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                        <subviews>
+                            <wkWebView wantsLayer="YES" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="eOr-cG-IQY">
+                                <rect key="frame" x="0.0" y="0.0" width="425" height="325"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                <wkWebViewConfiguration key="configuration">
+                                    <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
+                                    <wkPreferences key="preferences"/>
+                                </wkWebViewConfiguration>
+                            </wkWebView>
+                        </subviews>
+                    </view>
+                    <connections>
+                        <outlet property="webView" destination="eOr-cG-IQY" id="GFe-mU-dBY"/>
+                    </connections>
+                </viewController>
+                <customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="75" y="655"/>
+        </scene>
+    </scenes>
+</document>
diff --git a/safari/Junction/Junction.entitlements b/safari/Junction/Junction.entitlements
new file mode 100644 (file)
index 0000000..625af03
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>com.apple.security.app-sandbox</key>
+       <true/>
+       <key>com.apple.security.files.user-selected.read-only</key>
+       <true/>
+       <key>com.apple.security.network.client</key>
+       <true/>
+</dict>
+</plist>
diff --git a/safari/Junction/Resources/Icon.png b/safari/Junction/Resources/Icon.png
new file mode 100644 (file)
index 0000000..f056447
Binary files /dev/null and b/safari/Junction/Resources/Icon.png differ
diff --git a/safari/Junction/Resources/Script.js b/safari/Junction/Resources/Script.js
new file mode 100644 (file)
index 0000000..f551e6b
--- /dev/null
@@ -0,0 +1,22 @@
+function show(enabled, useSettingsInsteadOfPreferences) {
+    if (useSettingsInsteadOfPreferences) {
+        document.getElementsByClassName('state-on')[0].innerText = "Junction’s extension is currently on. You can turn it off in the Extensions section of Safari Settings.";
+        document.getElementsByClassName('state-off')[0].innerText = "Junction’s extension is currently off. You can turn it on in the Extensions section of Safari Settings.";
+        document.getElementsByClassName('state-unknown')[0].innerText = "You can turn on Junction’s extension in the Extensions section of Safari Settings.";
+        document.getElementsByClassName('open-preferences')[0].innerText = "Quit and Open Safari Settings…";
+    }
+
+    if (typeof enabled === "boolean") {
+        document.body.classList.toggle(`state-on`, enabled);
+        document.body.classList.toggle(`state-off`, !enabled);
+    } else {
+        document.body.classList.remove(`state-on`);
+        document.body.classList.remove(`state-off`);
+    }
+}
+
+function openPreferences() {
+    webkit.messageHandlers.controller.postMessage("open-preferences");
+}
+
+document.querySelector("button.open-preferences").addEventListener("click", openPreferences);
diff --git a/safari/Junction/Resources/Style.css b/safari/Junction/Resources/Style.css
new file mode 100644 (file)
index 0000000..cbde9e6
--- /dev/null
@@ -0,0 +1,45 @@
+* {
+    -webkit-user-select: none;
+    -webkit-user-drag: none;
+    cursor: default;
+}
+
+:root {
+    color-scheme: light dark;
+
+    --spacing: 20px;
+}
+
+html {
+    height: 100%;
+}
+
+body {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-direction: column;
+
+    gap: var(--spacing);
+    margin: 0 calc(var(--spacing) * 2);
+    height: 100%;
+
+    font: -apple-system-short-body;
+    text-align: center;
+}
+
+body:not(.state-on, .state-off) :is(.state-on, .state-off) {
+    display: none;
+}
+
+body.state-on :is(.state-off, .state-unknown) {
+    display: none;
+}
+
+body.state-off :is(.state-on, .state-unknown) {
+    display: none;
+}
+
+button {
+    font-size: 1em;
+}
diff --git a/safari/Junction/ViewController.swift b/safari/Junction/ViewController.swift
new file mode 100644 (file)
index 0000000..91f4596
--- /dev/null
@@ -0,0 +1,57 @@
+//
+//  ViewController.swift
+//  Junction
+//
+//  Created by Ruben Beltran del Rio on 9/13/23.
+//
+
+import Cocoa
+import SafariServices
+import WebKit
+
+let extensionBundleIdentifier = "systems.tranquil.Junction.Extension"
+
+class ViewController: NSViewController, WKNavigationDelegate, WKScriptMessageHandler {
+
+    @IBOutlet var webView: WKWebView!
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+
+        self.webView.navigationDelegate = self
+
+        self.webView.configuration.userContentController.add(self, name: "controller")
+
+        self.webView.loadFileURL(Bundle.main.url(forResource: "Main", withExtension: "html")!, allowingReadAccessTo: Bundle.main.resourceURL!)
+    }
+
+    func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
+        SFSafariExtensionManager.getStateOfSafariExtension(withIdentifier: extensionBundleIdentifier) { (state, error) in
+            guard let state = state, error == nil else {
+                // Insert code to inform the user that something went wrong.
+                return
+            }
+
+            DispatchQueue.main.async {
+                if #available(macOS 13, *) {
+                    webView.evaluateJavaScript("show(\(state.isEnabled), true)")
+                } else {
+                    webView.evaluateJavaScript("show(\(state.isEnabled), false)")
+                }
+            }
+        }
+    }
+
+    func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
+        if (message.body as! String != "open-preferences") {
+            return;
+        }
+
+        SFSafariApplication.showPreferencesForExtension(withIdentifier: extensionBundleIdentifier) { error in
+            DispatchQueue.main.async {
+                NSApplication.shared.terminate(nil)
+            }
+        }
+    }
+
+}
diff --git a/safari/JunctionTests/JunctionTests.swift b/safari/JunctionTests/JunctionTests.swift
new file mode 100644 (file)
index 0000000..f1e1774
--- /dev/null
@@ -0,0 +1,36 @@
+//
+//  JunctionTests.swift
+//  JunctionTests
+//
+//  Created by Ruben Beltran del Rio on 9/13/23.
+//
+
+import XCTest
+@testable import Junction
+
+final class JunctionTests: XCTestCase {
+
+    override func setUpWithError() throws {
+        // Put setup code here. This method is called before the invocation of each test method in the class.
+    }
+
+    override func tearDownWithError() throws {
+        // Put teardown code here. This method is called after the invocation of each test method in the class.
+    }
+
+    func testExample() throws {
+        // This is an example of a functional test case.
+        // Use XCTAssert and related functions to verify your tests produce the correct results.
+        // Any test you write for XCTest can be annotated as throws and async.
+        // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
+        // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
+    }
+
+    func testPerformanceExample() throws {
+        // This is an example of a performance test case.
+        self.measure {
+            // Put the code you want to measure the time of here.
+        }
+    }
+
+}
diff --git a/safari/JunctionUITests/JunctionUITests.swift b/safari/JunctionUITests/JunctionUITests.swift
new file mode 100644 (file)
index 0000000..f973f37
--- /dev/null
@@ -0,0 +1,41 @@
+//
+//  JunctionUITests.swift
+//  JunctionUITests
+//
+//  Created by Ruben Beltran del Rio on 9/13/23.
+//
+
+import XCTest
+
+final class JunctionUITests: XCTestCase {
+
+    override func setUpWithError() throws {
+        // Put setup code here. This method is called before the invocation of each test method in the class.
+
+        // In UI tests it is usually best to stop immediately when a failure occurs.
+        continueAfterFailure = false
+
+        // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
+    }
+
+    override func tearDownWithError() throws {
+        // Put teardown code here. This method is called after the invocation of each test method in the class.
+    }
+
+    func testExample() throws {
+        // UI tests must launch the application that they test.
+        let app = XCUIApplication()
+        app.launch()
+
+        // Use XCTAssert and related functions to verify your tests produce the correct results.
+    }
+
+    func testLaunchPerformance() throws {
+        if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) {
+            // This measures how long it takes to launch your application.
+            measure(metrics: [XCTApplicationLaunchMetric()]) {
+                XCUIApplication().launch()
+            }
+        }
+    }
+}
diff --git a/safari/JunctionUITests/JunctionUITestsLaunchTests.swift b/safari/JunctionUITests/JunctionUITestsLaunchTests.swift
new file mode 100644 (file)
index 0000000..3f11944
--- /dev/null
@@ -0,0 +1,32 @@
+//
+//  JunctionUITestsLaunchTests.swift
+//  JunctionUITests
+//
+//  Created by Ruben Beltran del Rio on 9/13/23.
+//
+
+import XCTest
+
+final class JunctionUITestsLaunchTests: XCTestCase {
+
+    override class var runsForEachTargetApplicationUIConfiguration: Bool {
+        true
+    }
+
+    override func setUpWithError() throws {
+        continueAfterFailure = false
+    }
+
+    func testLaunch() throws {
+        let app = XCUIApplication()
+        app.launch()
+
+        // Insert steps here to perform after app launch but before taking a screenshot,
+        // such as logging into a test account or navigating somewhere in the app
+
+        let attachment = XCTAttachment(screenshot: app.screenshot())
+        attachment.name = "Launch Screen"
+        attachment.lifetime = .keepAlways
+        add(attachment)
+    }
+}