diff --git a/Makefile b/Makefile
index 9fcf4dc..df79d0c 100755
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,10 @@ build:
rm -rf dist
yarn build
+safari:
+ rm -rf Safari/Gitako/Gitako\ Extension/Resources/*
+ cd dist && cp -r . ../Safari/Gitako/Gitako\ Extension/Resources
+
test:
yarn test
@@ -45,3 +49,5 @@ compress-env:
compress-icons-into-source-for-mz-review:
zip -r dist/source-$(FULL_VERSION).zip vscode-icons/icons
+
+.PHONY: safari
diff --git a/Safari/.gitignore b/Safari/.gitignore
new file mode 100644
index 0000000..074d44a
--- /dev/null
+++ b/Safari/.gitignore
@@ -0,0 +1,28 @@
+# Xcode
+#
+# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
+
+## User settings
+xcuserdata/
+
+## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
+*.xcscmblueprint
+*.xccheckout
+
+## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
+build/
+DerivedData/
+*.moved-aside
+*.pbxuser
+!default.pbxuser
+*.mode1v3
+!default.mode1v3
+*.mode2v3
+!default.mode2v3
+*.perspectivev3
+!default.perspectivev3
+
+## Gcc Patch
+/*.gcno
+
+Resources
diff --git a/Safari/Gitako/Gitako Extension/Gitako_Extension.entitlements b/Safari/Gitako/Gitako Extension/Gitako_Extension.entitlements
new file mode 100644
index 0000000..f2ef3ae
--- /dev/null
+++ b/Safari/Gitako/Gitako Extension/Gitako_Extension.entitlements
@@ -0,0 +1,10 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.files.user-selected.read-only
+
+
+
diff --git a/Safari/Gitako/Gitako Extension/Info.plist b/Safari/Gitako/Gitako Extension/Info.plist
new file mode 100644
index 0000000..b3c30e9
--- /dev/null
+++ b/Safari/Gitako/Gitako Extension/Info.plist
@@ -0,0 +1,33 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Gitako Extension
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ $(PRODUCT_BUNDLE_PACKAGE_TYPE)
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+ LSMinimumSystemVersion
+ $(MACOSX_DEPLOYMENT_TARGET)
+ NSExtension
+
+ NSExtensionPointIdentifier
+ com.apple.Safari.web-extension
+ NSExtensionPrincipalClass
+ $(PRODUCT_MODULE_NAME).SafariWebExtensionHandler
+
+
+
diff --git a/Safari/Gitako/Gitako Extension/SafariWebExtensionHandler.swift b/Safari/Gitako/Gitako Extension/SafariWebExtensionHandler.swift
new file mode 100644
index 0000000..b5209a0
--- /dev/null
+++ b/Safari/Gitako/Gitako Extension/SafariWebExtensionHandler.swift
@@ -0,0 +1,9 @@
+import SafariServices
+import os.log
+
+let SFExtensionMessageKey = "message"
+
+class SafariWebExtensionHandler: NSObject, NSExtensionRequestHandling {
+ func beginRequest(with context: NSExtensionContext) {
+ }
+}
diff --git a/Safari/Gitako/Gitako.xcodeproj/project.pbxproj b/Safari/Gitako/Gitako.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..f4c6a25
--- /dev/null
+++ b/Safari/Gitako/Gitako.xcodeproj/project.pbxproj
@@ -0,0 +1,531 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 50;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ D24E2F0E25F51A12000E12CC /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D24E2F0D25F51A12000E12CC /* AppDelegate.swift */; };
+ D24E2F1125F51A12000E12CC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D24E2F0F25F51A12000E12CC /* Main.storyboard */; };
+ D24E2F1325F51A12000E12CC /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D24E2F1225F51A12000E12CC /* ViewController.swift */; };
+ D24E2F1525F51A12000E12CC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D24E2F1425F51A12000E12CC /* Assets.xcassets */; };
+ D24E2F1C25F51A13000E12CC /* Gitako Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = D24E2F1B25F51A13000E12CC /* Gitako Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+ D24E2F2125F51A13000E12CC /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D24E2F2025F51A13000E12CC /* Cocoa.framework */; };
+ D24E2F2425F51A13000E12CC /* SafariWebExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D24E2F2325F51A13000E12CC /* SafariWebExtensionHandler.swift */; };
+ D24E2F2B25F51A13000E12CC /* manifest.json in Resources */ = {isa = PBXBuildFile; fileRef = D24E2F2A25F51A13000E12CC /* manifest.json */; };
+ D24E2F2D25F51A13000E12CC /* background.js in Resources */ = {isa = PBXBuildFile; fileRef = D24E2F2C25F51A13000E12CC /* background.js */; };
+ D24E2F2F25F51A13000E12CC /* content.js in Resources */ = {isa = PBXBuildFile; fileRef = D24E2F2E25F51A13000E12CC /* content.js */; };
+ D24E2F4A25F52669000E12CC /* content.css in Resources */ = {isa = PBXBuildFile; fileRef = D24E2F4525F52669000E12CC /* content.css */; };
+ D24E2F4B25F52669000E12CC /* browser-polyfill.js in Resources */ = {isa = PBXBuildFile; fileRef = D24E2F4625F52669000E12CC /* browser-polyfill.js */; };
+ D24E2F4C25F52669000E12CC /* firefox-shim.js in Resources */ = {isa = PBXBuildFile; fileRef = D24E2F4825F52669000E12CC /* firefox-shim.js */; };
+ D24E2F4D25F52669000E12CC /* icons in Resources */ = {isa = PBXBuildFile; fileRef = D24E2F4925F52669000E12CC /* icons */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ D24E2F1D25F51A13000E12CC /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = D24E2F0125F51A12000E12CC /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = D24E2F1A25F51A13000E12CC;
+ remoteInfo = "Gitako Extension";
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ D24E2F3D25F51A13000E12CC /* Embed App Extensions */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 13;
+ files = (
+ D24E2F1C25F51A13000E12CC /* Gitako Extension.appex in Embed App Extensions */,
+ );
+ name = "Embed App Extensions";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ D24E2F0925F51A12000E12CC /* Gitako.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Gitako.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ D24E2F0C25F51A12000E12CC /* Gitako.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Gitako.entitlements; sourceTree = ""; };
+ D24E2F0D25F51A12000E12CC /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ D24E2F1025F51A12000E12CC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ D24E2F1225F51A12000E12CC /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
+ D24E2F1425F51A12000E12CC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ D24E2F1625F51A12000E12CC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ D24E2F1B25F51A13000E12CC /* Gitako Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Gitako Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
+ D24E2F2025F51A13000E12CC /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ D24E2F2325F51A13000E12CC /* SafariWebExtensionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafariWebExtensionHandler.swift; sourceTree = ""; };
+ D24E2F2A25F51A13000E12CC /* manifest.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = manifest.json; sourceTree = ""; };
+ D24E2F2C25F51A13000E12CC /* background.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = background.js; sourceTree = ""; };
+ D24E2F2E25F51A13000E12CC /* content.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = content.js; sourceTree = ""; };
+ D24E2F3625F51A13000E12CC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ D24E2F3725F51A13000E12CC /* Gitako_Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Gitako_Extension.entitlements; sourceTree = ""; };
+ D24E2F4325F52669000E12CC /* content.css.map */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = content.css.map; sourceTree = ""; };
+ D24E2F4425F52669000E12CC /* content.js.map */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = content.js.map; sourceTree = ""; };
+ D24E2F4525F52669000E12CC /* content.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = content.css; sourceTree = ""; };
+ D24E2F4625F52669000E12CC /* browser-polyfill.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "browser-polyfill.js"; sourceTree = ""; };
+ D24E2F4725F52669000E12CC /* background.js.map */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = background.js.map; sourceTree = ""; };
+ D24E2F4825F52669000E12CC /* firefox-shim.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "firefox-shim.js"; sourceTree = ""; };
+ D24E2F4925F52669000E12CC /* icons */ = {isa = PBXFileReference; lastKnownFileType = folder; path = icons; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ D24E2F0625F51A12000E12CC /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D24E2F1825F51A13000E12CC /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D24E2F2125F51A13000E12CC /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ D24E2F0025F51A12000E12CC = {
+ isa = PBXGroup;
+ children = (
+ D24E2F0B25F51A12000E12CC /* Gitako */,
+ D24E2F2225F51A13000E12CC /* Gitako Extension */,
+ D24E2F1F25F51A13000E12CC /* Frameworks */,
+ D24E2F0A25F51A12000E12CC /* Products */,
+ );
+ sourceTree = "";
+ };
+ D24E2F0A25F51A12000E12CC /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ D24E2F0925F51A12000E12CC /* Gitako.app */,
+ D24E2F1B25F51A13000E12CC /* Gitako Extension.appex */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ D24E2F0B25F51A12000E12CC /* Gitako */ = {
+ isa = PBXGroup;
+ children = (
+ D24E2F0C25F51A12000E12CC /* Gitako.entitlements */,
+ D24E2F0D25F51A12000E12CC /* AppDelegate.swift */,
+ D24E2F0F25F51A12000E12CC /* Main.storyboard */,
+ D24E2F1225F51A12000E12CC /* ViewController.swift */,
+ D24E2F1425F51A12000E12CC /* Assets.xcassets */,
+ D24E2F1625F51A12000E12CC /* Info.plist */,
+ );
+ path = Gitako;
+ sourceTree = "";
+ };
+ D24E2F1F25F51A13000E12CC /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ D24E2F2025F51A13000E12CC /* Cocoa.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ D24E2F2225F51A13000E12CC /* Gitako Extension */ = {
+ isa = PBXGroup;
+ children = (
+ D24E2F2325F51A13000E12CC /* SafariWebExtensionHandler.swift */,
+ D24E2F3625F51A13000E12CC /* Info.plist */,
+ D24E2F3725F51A13000E12CC /* Gitako_Extension.entitlements */,
+ D24E2F2525F51A13000E12CC /* Resources */,
+ );
+ path = "Gitako Extension";
+ sourceTree = "";
+ };
+ D24E2F2525F51A13000E12CC /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ D24E2F4725F52669000E12CC /* background.js.map */,
+ D24E2F4625F52669000E12CC /* browser-polyfill.js */,
+ D24E2F4525F52669000E12CC /* content.css */,
+ D24E2F4325F52669000E12CC /* content.css.map */,
+ D24E2F4425F52669000E12CC /* content.js.map */,
+ D24E2F4825F52669000E12CC /* firefox-shim.js */,
+ D24E2F4925F52669000E12CC /* icons */,
+ D24E2F2A25F51A13000E12CC /* manifest.json */,
+ D24E2F2C25F51A13000E12CC /* background.js */,
+ D24E2F2E25F51A13000E12CC /* content.js */,
+ );
+ path = Resources;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ D24E2F0825F51A12000E12CC /* Gitako */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = D24E2F3E25F51A13000E12CC /* Build configuration list for PBXNativeTarget "Gitako" */;
+ buildPhases = (
+ D24E2F0525F51A12000E12CC /* Sources */,
+ D24E2F0625F51A12000E12CC /* Frameworks */,
+ D24E2F0725F51A12000E12CC /* Resources */,
+ D24E2F3D25F51A13000E12CC /* Embed App Extensions */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ D24E2F1E25F51A13000E12CC /* PBXTargetDependency */,
+ );
+ name = Gitako;
+ productName = Gitako;
+ productReference = D24E2F0925F51A12000E12CC /* Gitako.app */;
+ productType = "com.apple.product-type.application";
+ };
+ D24E2F1A25F51A13000E12CC /* Gitako Extension */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = D24E2F3A25F51A13000E12CC /* Build configuration list for PBXNativeTarget "Gitako Extension" */;
+ buildPhases = (
+ D24E2F1725F51A13000E12CC /* Sources */,
+ D24E2F1825F51A13000E12CC /* Frameworks */,
+ D24E2F1925F51A13000E12CC /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "Gitako Extension";
+ productName = "Gitako Extension";
+ productReference = D24E2F1B25F51A13000E12CC /* Gitako Extension.appex */;
+ productType = "com.apple.product-type.app-extension";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ D24E2F0125F51A12000E12CC /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastSwiftUpdateCheck = 1240;
+ LastUpgradeCheck = 1240;
+ TargetAttributes = {
+ D24E2F0825F51A12000E12CC = {
+ CreatedOnToolsVersion = 12.4;
+ };
+ D24E2F1A25F51A13000E12CC = {
+ CreatedOnToolsVersion = 12.4;
+ };
+ };
+ };
+ buildConfigurationList = D24E2F0425F51A12000E12CC /* Build configuration list for PBXProject "Gitako" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = D24E2F0025F51A12000E12CC;
+ productRefGroup = D24E2F0A25F51A12000E12CC /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ D24E2F0825F51A12000E12CC /* Gitako */,
+ D24E2F1A25F51A13000E12CC /* Gitako Extension */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ D24E2F0725F51A12000E12CC /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D24E2F1525F51A12000E12CC /* Assets.xcassets in Resources */,
+ D24E2F1125F51A12000E12CC /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D24E2F1925F51A13000E12CC /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D24E2F4B25F52669000E12CC /* browser-polyfill.js in Resources */,
+ D24E2F4A25F52669000E12CC /* content.css in Resources */,
+ D24E2F2D25F51A13000E12CC /* background.js in Resources */,
+ D24E2F2B25F51A13000E12CC /* manifest.json in Resources */,
+ D24E2F4C25F52669000E12CC /* firefox-shim.js in Resources */,
+ D24E2F4D25F52669000E12CC /* icons in Resources */,
+ D24E2F2F25F51A13000E12CC /* content.js in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ D24E2F0525F51A12000E12CC /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D24E2F1325F51A12000E12CC /* ViewController.swift in Sources */,
+ D24E2F0E25F51A12000E12CC /* AppDelegate.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D24E2F1725F51A13000E12CC /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D24E2F2425F51A13000E12CC /* SafariWebExtensionHandler.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ D24E2F1E25F51A13000E12CC /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = D24E2F1A25F51A13000E12CC /* Gitako Extension */;
+ targetProxy = D24E2F1D25F51A13000E12CC /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ D24E2F0F25F51A12000E12CC /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ D24E2F1025F51A12000E12CC /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ D24E2F3825F51A13000E12CC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ 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;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ 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;
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+ MTL_FAST_MATH = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ };
+ name = Debug;
+ };
+ D24E2F3925F51A13000E12CC /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ 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;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ 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;
+ MACOSX_DEPLOYMENT_TARGET = 10.15;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ MTL_FAST_MATH = YES;
+ SDKROOT = macosx;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ };
+ name = Release;
+ };
+ D24E2F3B25F51A13000E12CC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_ENTITLEMENTS = "Gitako Extension/Gitako_Extension.entitlements";
+ CODE_SIGN_STYLE = Automatic;
+ INFOPLIST_FILE = "Gitako Extension/Info.plist";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ "@executable_path/../../../../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
+ PRODUCT_BUNDLE_IDENTIFIER = enixcoda.Gitako.Extension;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ SWIFT_VERSION = 5.0;
+ };
+ name = Debug;
+ };
+ D24E2F3C25F51A13000E12CC /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_ENTITLEMENTS = "Gitako Extension/Gitako_Extension.entitlements";
+ CODE_SIGN_STYLE = Automatic;
+ INFOPLIST_FILE = "Gitako Extension/Info.plist";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ "@executable_path/../../../../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
+ PRODUCT_BUNDLE_IDENTIFIER = enixcoda.Gitako.Extension;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SKIP_INSTALL = YES;
+ SWIFT_VERSION = 5.0;
+ };
+ name = Release;
+ };
+ D24E2F3F25F51A13000E12CC /* 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 = Gitako/Gitako.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = Gitako/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
+ PRODUCT_BUNDLE_IDENTIFIER = enixcoda.Gitako;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Debug;
+ };
+ D24E2F4025F51A13000E12CC /* 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 = Gitako/Gitako.entitlements;
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = Gitako/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.14;
+ PRODUCT_BUNDLE_IDENTIFIER = enixcoda.Gitako;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ D24E2F0425F51A12000E12CC /* Build configuration list for PBXProject "Gitako" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D24E2F3825F51A13000E12CC /* Debug */,
+ D24E2F3925F51A13000E12CC /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ D24E2F3A25F51A13000E12CC /* Build configuration list for PBXNativeTarget "Gitako Extension" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D24E2F3B25F51A13000E12CC /* Debug */,
+ D24E2F3C25F51A13000E12CC /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ D24E2F3E25F51A13000E12CC /* Build configuration list for PBXNativeTarget "Gitako" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D24E2F3F25F51A13000E12CC /* Debug */,
+ D24E2F4025F51A13000E12CC /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = D24E2F0125F51A12000E12CC /* Project object */;
+}
diff --git a/Safari/Gitako/Gitako.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Safari/Gitako/Gitako.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/Safari/Gitako/Gitako.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/Safari/Gitako/Gitako.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Safari/Gitako/Gitako.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/Safari/Gitako/Gitako.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/Safari/Gitako/Gitako/AppDelegate.swift b/Safari/Gitako/Gitako/AppDelegate.swift
new file mode 100644
index 0000000..6222982
--- /dev/null
+++ b/Safari/Gitako/Gitako/AppDelegate.swift
@@ -0,0 +1,18 @@
+import Cocoa
+
+@main
+class AppDelegate: NSObject, NSApplicationDelegate {
+
+ func applicationDidFinishLaunching(_ notification: Notification) {
+ // Insert code here to initialize your application
+ }
+
+ func applicationWillTerminate(_ notification: Notification) {
+ // Insert code here to tear down your application
+ }
+
+ func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
+ return true
+ }
+
+}
diff --git a/Safari/Gitako/Gitako/Assets.xcassets/AccentColor.colorset/Contents.json b/Safari/Gitako/Gitako/Assets.xcassets/AccentColor.colorset/Contents.json
new file mode 100644
index 0000000..eb87897
--- /dev/null
+++ b/Safari/Gitako/Gitako/Assets.xcassets/AccentColor.colorset/Contents.json
@@ -0,0 +1,11 @@
+{
+ "colors" : [
+ {
+ "idiom" : "universal"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Safari/Gitako/Gitako/Assets.xcassets/AppIcon.appiconset/Contents.json b/Safari/Gitako/Gitako/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..3f00db4
--- /dev/null
+++ b/Safari/Gitako/Gitako/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,58 @@
+{
+ "images" : [
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "16x16"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "16x16"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "32x32"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "32x32"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "128x128"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "128x128"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "256x256"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "256x256"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "1x",
+ "size" : "512x512"
+ },
+ {
+ "idiom" : "mac",
+ "scale" : "2x",
+ "size" : "512x512"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Safari/Gitako/Gitako/Assets.xcassets/Contents.json b/Safari/Gitako/Gitako/Assets.xcassets/Contents.json
new file mode 100644
index 0000000..73c0059
--- /dev/null
+++ b/Safari/Gitako/Gitako/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Safari/Gitako/Gitako/Base.lproj/Main.storyboard b/Safari/Gitako/Gitako/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..b7037ff
--- /dev/null
+++ b/Safari/Gitako/Gitako/Base.lproj/Main.storyboard
@@ -0,0 +1,168 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Safari/Gitako/Gitako/Gitako.entitlements b/Safari/Gitako/Gitako/Gitako.entitlements
new file mode 100644
index 0000000..f2ef3ae
--- /dev/null
+++ b/Safari/Gitako/Gitako/Gitako.entitlements
@@ -0,0 +1,10 @@
+
+
+
+
+ com.apple.security.app-sandbox
+
+ com.apple.security.files.user-selected.read-only
+
+
+
diff --git a/Safari/Gitako/Gitako/Info.plist b/Safari/Gitako/Gitako/Info.plist
new file mode 100644
index 0000000..cfbbdb7
--- /dev/null
+++ b/Safari/Gitako/Gitako/Info.plist
@@ -0,0 +1,30 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIconFile
+
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ $(PRODUCT_BUNDLE_PACKAGE_TYPE)
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+ LSMinimumSystemVersion
+ $(MACOSX_DEPLOYMENT_TARGET)
+ NSMainStoryboardFile
+ Main
+ NSPrincipalClass
+ NSApplication
+
+
diff --git a/Safari/Gitako/Gitako/ViewController.swift b/Safari/Gitako/Gitako/ViewController.swift
new file mode 100644
index 0000000..ce019ae
--- /dev/null
+++ b/Safari/Gitako/Gitako/ViewController.swift
@@ -0,0 +1,44 @@
+import Cocoa
+import SafariServices.SFSafariApplication
+import SafariServices.SFSafariExtensionManager
+
+let appName = "Gitako"
+let extensionBundleIdentifier = "enixcoda.Gitako.Extension"
+
+class ViewController: NSViewController {
+
+ @IBOutlet var appNameLabel: NSTextField!
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ self.appNameLabel.stringValue = appName
+ 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 (state.isEnabled) {
+ self.appNameLabel.stringValue = "\(appName)'s extension is currently on."
+ } else {
+ self.appNameLabel.stringValue = "\(appName)'s extension is currently off. You can turn it on in Safari Extensions preferences."
+ }
+ }
+ }
+ }
+
+ @IBAction func openSafariExtensionPreferences(_ sender: AnyObject?) {
+ SFSafariApplication.showPreferencesForExtension(withIdentifier: extensionBundleIdentifier) { error in
+ guard error == nil else {
+ // Insert code to inform the user that something went wrong.
+ return
+ }
+
+ DispatchQueue.main.async {
+ NSApplication.shared.terminate(nil)
+ }
+ }
+ }
+
+}