diff --git a/safari/Conventional Comments/Conventional Comments Extension/Conventional_Comments_Extension.entitlements b/safari/Conventional Comments/Conventional Comments Extension/Conventional_Comments_Extension.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments Extension/Conventional_Comments_Extension.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/safari/Conventional Comments/Conventional Comments Extension/Info.plist b/safari/Conventional Comments/Conventional Comments Extension/Info.plist new file mode 100644 index 0000000..9ee504d --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments Extension/Info.plist @@ -0,0 +1,13 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.Safari.web-extension + NSExtensionPrincipalClass + $(PRODUCT_MODULE_NAME).SafariWebExtensionHandler + + + diff --git a/safari/Conventional Comments/Conventional Comments Extension/SafariWebExtensionHandler.swift b/safari/Conventional Comments/Conventional Comments Extension/SafariWebExtensionHandler.swift new file mode 100644 index 0000000..41adf36 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments Extension/SafariWebExtensionHandler.swift @@ -0,0 +1,42 @@ +// +// SafariWebExtensionHandler.swift +// Conventional Comments Extension +// +// Created by Rodrigo Moreno on 22/05/25. +// + +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 15.0, macOS 11.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() + if #available(iOS 15.0, macOS 11.0, *) { + response.userInfo = [ SFExtensionMessageKey: [ "echo": message ] ] + } else { + response.userInfo = [ "message": [ "echo": message ] ] + } + + context.completeRequest(returningItems: [ response ], completionHandler: nil) + } + +} diff --git a/safari/Conventional Comments/Conventional Comments.xcodeproj/project.pbxproj b/safari/Conventional Comments/Conventional Comments.xcodeproj/project.pbxproj new file mode 100644 index 0000000..911bc2b --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments.xcodeproj/project.pbxproj @@ -0,0 +1,827 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 7F8B8B4E2DDFCC9A0083171E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8B8B4D2DDFCC9A0083171E /* AppDelegate.swift */; }; + 7F8B8B522DDFCC9A0083171E /* Main.html in Resources */ = {isa = PBXBuildFile; fileRef = 7F8B8B502DDFCC9A0083171E /* Main.html */; }; + 7F8B8B542DDFCC9A0083171E /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 7F8B8B532DDFCC9A0083171E /* Icon.png */; }; + 7F8B8B562DDFCC9A0083171E /* Style.css in Resources */ = {isa = PBXBuildFile; fileRef = 7F8B8B552DDFCC9A0083171E /* Style.css */; }; + 7F8B8B582DDFCC9A0083171E /* Script.js in Resources */ = {isa = PBXBuildFile; fileRef = 7F8B8B572DDFCC9A0083171E /* Script.js */; }; + 7F8B8B5A2DDFCC9A0083171E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8B8B592DDFCC9A0083171E /* ViewController.swift */; }; + 7F8B8B5D2DDFCC9A0083171E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7F8B8B5B2DDFCC9A0083171E /* Main.storyboard */; }; + 7F8B8B5F2DDFCC9B0083171E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7F8B8B5E2DDFCC9B0083171E /* Assets.xcassets */; }; + 7F8B8B6C2DDFCC9B0083171E /* Conventional_CommentsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8B8B6B2DDFCC9B0083171E /* Conventional_CommentsTests.swift */; }; + 7F8B8B762DDFCC9B0083171E /* Conventional_CommentsUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8B8B752DDFCC9B0083171E /* Conventional_CommentsUITests.swift */; }; + 7F8B8B782DDFCC9B0083171E /* Conventional_CommentsUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8B8B772DDFCC9B0083171E /* Conventional_CommentsUITestsLaunchTests.swift */; }; + 7F8B8B7E2DDFCC9B0083171E /* Conventional Comments Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 7F8B8B7D2DDFCC9B0083171E /* Conventional Comments Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 7F8B8B832DDFCC9B0083171E /* SafariWebExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8B8B822DDFCC9B0083171E /* SafariWebExtensionHandler.swift */; }; + 7F8B8B9A2DDFCC9B0083171E /* icons in Resources */ = {isa = PBXBuildFile; fileRef = 7F8B8B962DDFCC9B0083171E /* icons */; }; + 7F8B8B9B2DDFCC9B0083171E /* style.css in Resources */ = {isa = PBXBuildFile; fileRef = 7F8B8B972DDFCC9B0083171E /* style.css */; }; + 7F8B8B9C2DDFCC9B0083171E /* manifest.json in Resources */ = {isa = PBXBuildFile; fileRef = 7F8B8B982DDFCC9B0083171E /* manifest.json */; }; + 7F8B8B9D2DDFCC9B0083171E /* content.js in Resources */ = {isa = PBXBuildFile; fileRef = 7F8B8B992DDFCC9B0083171E /* content.js */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 7F8B8B682DDFCC9B0083171E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7F8B8B422DDFCC9A0083171E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7F8B8B492DDFCC9A0083171E; + remoteInfo = "Conventional Comments"; + }; + 7F8B8B722DDFCC9B0083171E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7F8B8B422DDFCC9A0083171E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7F8B8B492DDFCC9A0083171E; + remoteInfo = "Conventional Comments"; + }; + 7F8B8B7F2DDFCC9B0083171E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7F8B8B422DDFCC9A0083171E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7F8B8B7C2DDFCC9B0083171E; + remoteInfo = "Conventional Comments Extension"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 7F8B8B8B2DDFCC9B0083171E /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 7F8B8B7E2DDFCC9B0083171E /* Conventional Comments Extension.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 7F8B8B4A2DDFCC9A0083171E /* Conventional Comments.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Conventional Comments.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 7F8B8B4D2DDFCC9A0083171E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7F8B8B512DDFCC9A0083171E /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = Base; path = Base.lproj/Main.html; sourceTree = ""; }; + 7F8B8B532DDFCC9A0083171E /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; + 7F8B8B552DDFCC9A0083171E /* Style.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = Style.css; sourceTree = ""; }; + 7F8B8B572DDFCC9A0083171E /* Script.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = Script.js; sourceTree = ""; }; + 7F8B8B592DDFCC9A0083171E /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 7F8B8B5C2DDFCC9A0083171E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 7F8B8B5E2DDFCC9B0083171E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7F8B8B602DDFCC9B0083171E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7F8B8B612DDFCC9B0083171E /* Conventional_Comments.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Conventional_Comments.entitlements; sourceTree = ""; }; + 7F8B8B622DDFCC9B0083171E /* Conventional Comments.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Conventional Comments.entitlements"; sourceTree = ""; }; + 7F8B8B672DDFCC9B0083171E /* Conventional CommentsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Conventional CommentsTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 7F8B8B6B2DDFCC9B0083171E /* Conventional_CommentsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Conventional_CommentsTests.swift; sourceTree = ""; }; + 7F8B8B712DDFCC9B0083171E /* Conventional CommentsUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Conventional CommentsUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 7F8B8B752DDFCC9B0083171E /* Conventional_CommentsUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Conventional_CommentsUITests.swift; sourceTree = ""; }; + 7F8B8B772DDFCC9B0083171E /* Conventional_CommentsUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Conventional_CommentsUITestsLaunchTests.swift; sourceTree = ""; }; + 7F8B8B7D2DDFCC9B0083171E /* Conventional Comments Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Conventional Comments Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + 7F8B8B822DDFCC9B0083171E /* SafariWebExtensionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafariWebExtensionHandler.swift; sourceTree = ""; }; + 7F8B8B842DDFCC9B0083171E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7F8B8B852DDFCC9B0083171E /* Conventional_Comments_Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Conventional_Comments_Extension.entitlements; sourceTree = ""; }; + 7F8B8B962DDFCC9B0083171E /* icons */ = {isa = PBXFileReference; lastKnownFileType = folder; name = icons; path = ../../../build/chrome/icons; sourceTree = ""; }; + 7F8B8B972DDFCC9B0083171E /* style.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; name = style.css; path = ../../../build/chrome/style.css; sourceTree = ""; }; + 7F8B8B982DDFCC9B0083171E /* manifest.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = manifest.json; path = ../../../build/chrome/manifest.json; sourceTree = ""; }; + 7F8B8B992DDFCC9B0083171E /* content.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = content.js; path = ../../../build/chrome/content.js; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 7F8B8B472DDFCC9A0083171E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7F8B8B642DDFCC9B0083171E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7F8B8B6E2DDFCC9B0083171E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7F8B8B7A2DDFCC9B0083171E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 7F8B8B412DDFCC9A0083171E = { + isa = PBXGroup; + children = ( + 7F8B8B4C2DDFCC9A0083171E /* Conventional Comments */, + 7F8B8B6A2DDFCC9B0083171E /* Conventional CommentsTests */, + 7F8B8B742DDFCC9B0083171E /* Conventional CommentsUITests */, + 7F8B8B812DDFCC9B0083171E /* Conventional Comments Extension */, + 7F8B8B4B2DDFCC9A0083171E /* Products */, + ); + sourceTree = ""; + }; + 7F8B8B4B2DDFCC9A0083171E /* Products */ = { + isa = PBXGroup; + children = ( + 7F8B8B4A2DDFCC9A0083171E /* Conventional Comments.app */, + 7F8B8B672DDFCC9B0083171E /* Conventional CommentsTests.xctest */, + 7F8B8B712DDFCC9B0083171E /* Conventional CommentsUITests.xctest */, + 7F8B8B7D2DDFCC9B0083171E /* Conventional Comments Extension.appex */, + ); + name = Products; + sourceTree = ""; + }; + 7F8B8B4C2DDFCC9A0083171E /* Conventional Comments */ = { + isa = PBXGroup; + children = ( + 7F8B8B4D2DDFCC9A0083171E /* AppDelegate.swift */, + 7F8B8B592DDFCC9A0083171E /* ViewController.swift */, + 7F8B8B5B2DDFCC9A0083171E /* Main.storyboard */, + 7F8B8B5E2DDFCC9B0083171E /* Assets.xcassets */, + 7F8B8B602DDFCC9B0083171E /* Info.plist */, + 7F8B8B612DDFCC9B0083171E /* Conventional_Comments.entitlements */, + 7F8B8B622DDFCC9B0083171E /* Conventional Comments.entitlements */, + 7F8B8B4F2DDFCC9A0083171E /* Resources */, + ); + path = "Conventional Comments"; + sourceTree = ""; + }; + 7F8B8B4F2DDFCC9A0083171E /* Resources */ = { + isa = PBXGroup; + children = ( + 7F8B8B502DDFCC9A0083171E /* Main.html */, + 7F8B8B532DDFCC9A0083171E /* Icon.png */, + 7F8B8B552DDFCC9A0083171E /* Style.css */, + 7F8B8B572DDFCC9A0083171E /* Script.js */, + ); + path = Resources; + sourceTree = ""; + }; + 7F8B8B6A2DDFCC9B0083171E /* Conventional CommentsTests */ = { + isa = PBXGroup; + children = ( + 7F8B8B6B2DDFCC9B0083171E /* Conventional_CommentsTests.swift */, + ); + path = "Conventional CommentsTests"; + sourceTree = ""; + }; + 7F8B8B742DDFCC9B0083171E /* Conventional CommentsUITests */ = { + isa = PBXGroup; + children = ( + 7F8B8B752DDFCC9B0083171E /* Conventional_CommentsUITests.swift */, + 7F8B8B772DDFCC9B0083171E /* Conventional_CommentsUITestsLaunchTests.swift */, + ); + path = "Conventional CommentsUITests"; + sourceTree = ""; + }; + 7F8B8B812DDFCC9B0083171E /* Conventional Comments Extension */ = { + isa = PBXGroup; + children = ( + 7F8B8B952DDFCC9B0083171E /* Resources */, + 7F8B8B822DDFCC9B0083171E /* SafariWebExtensionHandler.swift */, + 7F8B8B842DDFCC9B0083171E /* Info.plist */, + 7F8B8B852DDFCC9B0083171E /* Conventional_Comments_Extension.entitlements */, + ); + path = "Conventional Comments Extension"; + sourceTree = ""; + }; + 7F8B8B952DDFCC9B0083171E /* Resources */ = { + isa = PBXGroup; + children = ( + 7F8B8B962DDFCC9B0083171E /* icons */, + 7F8B8B972DDFCC9B0083171E /* style.css */, + 7F8B8B982DDFCC9B0083171E /* manifest.json */, + 7F8B8B992DDFCC9B0083171E /* content.js */, + ); + name = Resources; + path = "Conventional Comments Extension"; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 7F8B8B492DDFCC9A0083171E /* Conventional Comments */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7F8B8B8C2DDFCC9B0083171E /* Build configuration list for PBXNativeTarget "Conventional Comments" */; + buildPhases = ( + 7F8B8B462DDFCC9A0083171E /* Sources */, + 7F8B8B472DDFCC9A0083171E /* Frameworks */, + 7F8B8B482DDFCC9A0083171E /* Resources */, + 7F8B8B8B2DDFCC9B0083171E /* Embed Foundation Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 7F8B8B802DDFCC9B0083171E /* PBXTargetDependency */, + ); + name = "Conventional Comments"; + packageProductDependencies = ( + ); + productName = "Conventional Comments"; + productReference = 7F8B8B4A2DDFCC9A0083171E /* Conventional Comments.app */; + productType = "com.apple.product-type.application"; + }; + 7F8B8B662DDFCC9B0083171E /* Conventional CommentsTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7F8B8B8F2DDFCC9B0083171E /* Build configuration list for PBXNativeTarget "Conventional CommentsTests" */; + buildPhases = ( + 7F8B8B632DDFCC9B0083171E /* Sources */, + 7F8B8B642DDFCC9B0083171E /* Frameworks */, + 7F8B8B652DDFCC9B0083171E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 7F8B8B692DDFCC9B0083171E /* PBXTargetDependency */, + ); + name = "Conventional CommentsTests"; + packageProductDependencies = ( + ); + productName = "Conventional CommentsTests"; + productReference = 7F8B8B672DDFCC9B0083171E /* Conventional CommentsTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 7F8B8B702DDFCC9B0083171E /* Conventional CommentsUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7F8B8B922DDFCC9B0083171E /* Build configuration list for PBXNativeTarget "Conventional CommentsUITests" */; + buildPhases = ( + 7F8B8B6D2DDFCC9B0083171E /* Sources */, + 7F8B8B6E2DDFCC9B0083171E /* Frameworks */, + 7F8B8B6F2DDFCC9B0083171E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 7F8B8B732DDFCC9B0083171E /* PBXTargetDependency */, + ); + name = "Conventional CommentsUITests"; + packageProductDependencies = ( + ); + productName = "Conventional CommentsUITests"; + productReference = 7F8B8B712DDFCC9B0083171E /* Conventional CommentsUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; + 7F8B8B7C2DDFCC9B0083171E /* Conventional Comments Extension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7F8B8B882DDFCC9B0083171E /* Build configuration list for PBXNativeTarget "Conventional Comments Extension" */; + buildPhases = ( + 7F8B8B792DDFCC9B0083171E /* Sources */, + 7F8B8B7A2DDFCC9B0083171E /* Frameworks */, + 7F8B8B7B2DDFCC9B0083171E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Conventional Comments Extension"; + packageProductDependencies = ( + ); + productName = "Conventional Comments Extension"; + productReference = 7F8B8B7D2DDFCC9B0083171E /* Conventional Comments Extension.appex */; + productType = "com.apple.product-type.app-extension"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 7F8B8B422DDFCC9A0083171E /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1630; + LastUpgradeCheck = 1630; + TargetAttributes = { + 7F8B8B492DDFCC9A0083171E = { + CreatedOnToolsVersion = 16.3; + }; + 7F8B8B662DDFCC9B0083171E = { + CreatedOnToolsVersion = 16.3; + TestTargetID = 7F8B8B492DDFCC9A0083171E; + }; + 7F8B8B702DDFCC9B0083171E = { + CreatedOnToolsVersion = 16.3; + TestTargetID = 7F8B8B492DDFCC9A0083171E; + }; + 7F8B8B7C2DDFCC9B0083171E = { + CreatedOnToolsVersion = 16.3; + }; + }; + }; + buildConfigurationList = 7F8B8B452DDFCC9A0083171E /* Build configuration list for PBXProject "Conventional Comments" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 7F8B8B412DDFCC9A0083171E; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 7F8B8B4B2DDFCC9A0083171E /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 7F8B8B492DDFCC9A0083171E /* Conventional Comments */, + 7F8B8B662DDFCC9B0083171E /* Conventional CommentsTests */, + 7F8B8B702DDFCC9B0083171E /* Conventional CommentsUITests */, + 7F8B8B7C2DDFCC9B0083171E /* Conventional Comments Extension */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 7F8B8B482DDFCC9A0083171E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7F8B8B542DDFCC9A0083171E /* Icon.png in Resources */, + 7F8B8B5D2DDFCC9A0083171E /* Main.storyboard in Resources */, + 7F8B8B582DDFCC9A0083171E /* Script.js in Resources */, + 7F8B8B522DDFCC9A0083171E /* Main.html in Resources */, + 7F8B8B5F2DDFCC9B0083171E /* Assets.xcassets in Resources */, + 7F8B8B562DDFCC9A0083171E /* Style.css in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7F8B8B652DDFCC9B0083171E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7F8B8B6F2DDFCC9B0083171E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7F8B8B7B2DDFCC9B0083171E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7F8B8B9D2DDFCC9B0083171E /* content.js in Resources */, + 7F8B8B9A2DDFCC9B0083171E /* icons in Resources */, + 7F8B8B9C2DDFCC9B0083171E /* manifest.json in Resources */, + 7F8B8B9B2DDFCC9B0083171E /* style.css in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 7F8B8B462DDFCC9A0083171E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7F8B8B5A2DDFCC9A0083171E /* ViewController.swift in Sources */, + 7F8B8B4E2DDFCC9A0083171E /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7F8B8B632DDFCC9B0083171E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7F8B8B6C2DDFCC9B0083171E /* Conventional_CommentsTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7F8B8B6D2DDFCC9B0083171E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7F8B8B782DDFCC9B0083171E /* Conventional_CommentsUITestsLaunchTests.swift in Sources */, + 7F8B8B762DDFCC9B0083171E /* Conventional_CommentsUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7F8B8B792DDFCC9B0083171E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7F8B8B832DDFCC9B0083171E /* SafariWebExtensionHandler.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 7F8B8B692DDFCC9B0083171E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7F8B8B492DDFCC9A0083171E /* Conventional Comments */; + targetProxy = 7F8B8B682DDFCC9B0083171E /* PBXContainerItemProxy */; + }; + 7F8B8B732DDFCC9B0083171E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7F8B8B492DDFCC9A0083171E /* Conventional Comments */; + targetProxy = 7F8B8B722DDFCC9B0083171E /* PBXContainerItemProxy */; + }; + 7F8B8B802DDFCC9B0083171E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7F8B8B7C2DDFCC9B0083171E /* Conventional Comments Extension */; + targetProxy = 7F8B8B7F2DDFCC9B0083171E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 7F8B8B502DDFCC9A0083171E /* Main.html */ = { + isa = PBXVariantGroup; + children = ( + 7F8B8B512DDFCC9A0083171E /* Base */, + ); + name = Main.html; + sourceTree = ""; + }; + 7F8B8B5B2DDFCC9A0083171E /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7F8B8B5C2DDFCC9A0083171E /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 7F8B8B862DDFCC9B0083171E /* 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 = 15.4; + 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; + }; + 7F8B8B872DDFCC9B0083171E /* 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 = 15.4; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + }; + name = Release; + }; + 7F8B8B892DDFCC9B0083171E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "Conventional Comments Extension/Conventional_Comments_Extension.entitlements"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Conventional Comments Extension/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Conventional Comments 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 = "io.pullpo.Conventional-Comments.Extension"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 7F8B8B8A2DDFCC9B0083171E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_ENTITLEMENTS = "Conventional Comments Extension/Conventional_Comments_Extension.entitlements"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Conventional Comments Extension/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Conventional Comments 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 = "io.pullpo.Conventional-Comments.Extension"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 7F8B8B8D2DDFCC9B0083171E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "Conventional Comments/Conventional Comments.entitlements"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Conventional Comments/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Conventional Comments"; + 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 = "io.pullpo.Conventional-Comments"; + PRODUCT_NAME = "$(TARGET_NAME)"; + REGISTER_APP_GROUPS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 7F8B8B8E2DDFCC9B0083171E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = "Conventional Comments/Conventional Comments.entitlements"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Conventional Comments/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Conventional Comments"; + 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 = "io.pullpo.Conventional-Comments"; + PRODUCT_NAME = "$(TARGET_NAME)"; + REGISTER_APP_GROUPS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 7F8B8B902DDFCC9B0083171E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "io.pullpo.Conventional-CommentsTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Conventional Comments.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Conventional Comments"; + }; + name = Debug; + }; + 7F8B8B912DDFCC9B0083171E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "io.pullpo.Conventional-CommentsTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Conventional Comments.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Conventional Comments"; + }; + name = Release; + }; + 7F8B8B932DDFCC9B0083171E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "io.pullpo.Conventional-CommentsUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = "Conventional Comments"; + }; + name = Debug; + }; + 7F8B8B942DDFCC9B0083171E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "io.pullpo.Conventional-CommentsUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = "Conventional Comments"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 7F8B8B452DDFCC9A0083171E /* Build configuration list for PBXProject "Conventional Comments" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7F8B8B862DDFCC9B0083171E /* Debug */, + 7F8B8B872DDFCC9B0083171E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7F8B8B882DDFCC9B0083171E /* Build configuration list for PBXNativeTarget "Conventional Comments Extension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7F8B8B892DDFCC9B0083171E /* Debug */, + 7F8B8B8A2DDFCC9B0083171E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7F8B8B8C2DDFCC9B0083171E /* Build configuration list for PBXNativeTarget "Conventional Comments" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7F8B8B8D2DDFCC9B0083171E /* Debug */, + 7F8B8B8E2DDFCC9B0083171E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7F8B8B8F2DDFCC9B0083171E /* Build configuration list for PBXNativeTarget "Conventional CommentsTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7F8B8B902DDFCC9B0083171E /* Debug */, + 7F8B8B912DDFCC9B0083171E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 7F8B8B922DDFCC9B0083171E /* Build configuration list for PBXNativeTarget "Conventional CommentsUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7F8B8B932DDFCC9B0083171E /* Debug */, + 7F8B8B942DDFCC9B0083171E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 7F8B8B422DDFCC9A0083171E /* Project object */; +} diff --git a/safari/Conventional Comments/Conventional Comments.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/safari/Conventional Comments/Conventional Comments.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/safari/Conventional Comments/Conventional Comments.xcodeproj/project.xcworkspace/xcuserdata/rodmoreno.xcuserdatad/UserInterfaceState.xcuserstate b/safari/Conventional Comments/Conventional Comments.xcodeproj/project.xcworkspace/xcuserdata/rodmoreno.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..6987619 Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments.xcodeproj/project.xcworkspace/xcuserdata/rodmoreno.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/safari/Conventional Comments/Conventional Comments.xcodeproj/xcuserdata/rodmoreno.xcuserdatad/xcschemes/xcschememanagement.plist b/safari/Conventional Comments/Conventional Comments.xcodeproj/xcuserdata/rodmoreno.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..66072dd --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments.xcodeproj/xcuserdata/rodmoreno.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Conventional Comments.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/safari/Conventional Comments/Conventional Comments/AppDelegate.swift b/safari/Conventional Comments/Conventional Comments/AppDelegate.swift new file mode 100644 index 0000000..5e25c7b --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/AppDelegate.swift @@ -0,0 +1,21 @@ +// +// AppDelegate.swift +// Conventional Comments +// +// Created by Rodrigo Moreno on 22/05/25. +// + +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/Conventional Comments/Conventional Comments/Assets.xcassets/AccentColor.colorset/Contents.json b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/Contents.json b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..5c2eca5 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "mac-icon-16@1x.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "mac-icon-16@2x.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "mac-icon-32@1x.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "mac-icon-32@2x.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "mac-icon-128@1x.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "mac-icon-128@2x.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "mac-icon-256@1x.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "mac-icon-256@2x.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "mac-icon-512@1x.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "mac-icon-512@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png new file mode 100644 index 0000000..888515e Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-128@1x.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png new file mode 100644 index 0000000..fab74d1 Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-128@2x.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png new file mode 100644 index 0000000..2a94287 Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-16@1x.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png new file mode 100644 index 0000000..5a25f85 Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-16@2x.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png new file mode 100644 index 0000000..fab74d1 Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-256@1x.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png new file mode 100644 index 0000000..8a72df5 Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-256@2x.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png new file mode 100644 index 0000000..5a25f85 Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-32@1x.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png new file mode 100644 index 0000000..51b7c20 Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-32@2x.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png new file mode 100644 index 0000000..8a72df5 Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-512@1x.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png new file mode 100644 index 0000000..2d82496 Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/AppIcon.appiconset/mac-icon-512@2x.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/Contents.json b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/safari/Conventional Comments/Conventional Comments/Assets.xcassets/LargeIcon.imageset/Contents.json b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/LargeIcon.imageset/Contents.json new file mode 100644 index 0000000..a19a549 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Assets.xcassets/LargeIcon.imageset/Contents.json @@ -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/Conventional Comments/Conventional Comments/Base.lproj/Main.storyboard b/safari/Conventional Comments/Conventional Comments/Base.lproj/Main.storyboard new file mode 100644 index 0000000..2c4d471 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Base.lproj/Main.storyboard @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/safari/Conventional Comments/Conventional Comments/Conventional Comments.entitlements b/safari/Conventional Comments/Conventional Comments/Conventional Comments.entitlements new file mode 100644 index 0000000..625af03 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Conventional Comments.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + com.apple.security.network.client + + + diff --git a/safari/Conventional Comments/Conventional Comments/Conventional_Comments.entitlements b/safari/Conventional Comments/Conventional Comments/Conventional_Comments.entitlements new file mode 100644 index 0000000..18aff0c --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Conventional_Comments.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/safari/Conventional Comments/Conventional Comments/Info.plist b/safari/Conventional Comments/Conventional Comments/Info.plist new file mode 100644 index 0000000..8b0d85c --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Info.plist @@ -0,0 +1,8 @@ + + + + + SFSafariWebExtensionConverterVersion + 16.3 + + diff --git a/safari/Conventional Comments/Conventional Comments/Resources/Base.lproj/Main.html b/safari/Conventional Comments/Conventional Comments/Resources/Base.lproj/Main.html new file mode 100644 index 0000000..b72f601 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Resources/Base.lproj/Main.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + Conventional Comments Icon +

You can turn on Conventional Comments’s extension in Safari Extensions preferences.

+

Conventional Comments’s extension is currently on. You can turn it off in Safari Extensions preferences.

+

Conventional Comments’s extension is currently off. You can turn it on in Safari Extensions preferences.

+ + + diff --git a/safari/Conventional Comments/Conventional Comments/Resources/Icon.png b/safari/Conventional Comments/Conventional Comments/Resources/Icon.png new file mode 100644 index 0000000..a85226f Binary files /dev/null and b/safari/Conventional Comments/Conventional Comments/Resources/Icon.png differ diff --git a/safari/Conventional Comments/Conventional Comments/Resources/Script.js b/safari/Conventional Comments/Conventional Comments/Resources/Script.js new file mode 100644 index 0000000..de551a0 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Resources/Script.js @@ -0,0 +1,22 @@ +function show(enabled, useSettingsInsteadOfPreferences) { + if (useSettingsInsteadOfPreferences) { + document.getElementsByClassName('state-on')[0].innerText = "Conventional Comments’s extension is currently on. You can turn it off in the Extensions section of Safari Settings."; + document.getElementsByClassName('state-off')[0].innerText = "Conventional Comments’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 Conventional Comments’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/Conventional Comments/Conventional Comments/Resources/Style.css b/safari/Conventional Comments/Conventional Comments/Resources/Style.css new file mode 100644 index 0000000..cbde9e6 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/Resources/Style.css @@ -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/Conventional Comments/Conventional Comments/ViewController.swift b/safari/Conventional Comments/Conventional Comments/ViewController.swift new file mode 100644 index 0000000..cb75fe1 --- /dev/null +++ b/safari/Conventional Comments/Conventional Comments/ViewController.swift @@ -0,0 +1,57 @@ +// +// ViewController.swift +// Conventional Comments +// +// Created by Rodrigo Moreno on 22/05/25. +// + +import Cocoa +import SafariServices +import WebKit + +let extensionBundleIdentifier = "io.pullpo.Conventional-Comments.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/Conventional Comments/Conventional CommentsTests/Conventional_CommentsTests.swift b/safari/Conventional Comments/Conventional CommentsTests/Conventional_CommentsTests.swift new file mode 100644 index 0000000..33fa57c --- /dev/null +++ b/safari/Conventional Comments/Conventional CommentsTests/Conventional_CommentsTests.swift @@ -0,0 +1,17 @@ +// +// Conventional_CommentsTests.swift +// Conventional CommentsTests +// +// Created by Rodrigo Moreno on 22/05/25. +// + +import Testing +@testable import Conventional_Comments + +struct Conventional_CommentsTests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/safari/Conventional Comments/Conventional CommentsUITests/Conventional_CommentsUITests.swift b/safari/Conventional Comments/Conventional CommentsUITests/Conventional_CommentsUITests.swift new file mode 100644 index 0000000..572fe97 --- /dev/null +++ b/safari/Conventional Comments/Conventional CommentsUITests/Conventional_CommentsUITests.swift @@ -0,0 +1,41 @@ +// +// Conventional_CommentsUITests.swift +// Conventional CommentsUITests +// +// Created by Rodrigo Moreno on 22/05/25. +// + +import XCTest + +final class Conventional_CommentsUITests: 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. + } + + @MainActor + 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. + } + + @MainActor + func testLaunchPerformance() throws { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } +} diff --git a/safari/Conventional Comments/Conventional CommentsUITests/Conventional_CommentsUITestsLaunchTests.swift b/safari/Conventional Comments/Conventional CommentsUITests/Conventional_CommentsUITestsLaunchTests.swift new file mode 100644 index 0000000..fe0f5f9 --- /dev/null +++ b/safari/Conventional Comments/Conventional CommentsUITests/Conventional_CommentsUITestsLaunchTests.swift @@ -0,0 +1,33 @@ +// +// Conventional_CommentsUITestsLaunchTests.swift +// Conventional CommentsUITests +// +// Created by Rodrigo Moreno on 22/05/25. +// + +import XCTest + +final class Conventional_CommentsUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + @MainActor + 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) + } +}