Skip to content
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1 from ffried/update_to_1_1
Browse files Browse the repository at this point in the history
Update script to upstream version 0.1.1, remove dead code, add german translation
  • Loading branch information
aeilot authored Oct 22, 2020
2 parents bac134d + 16b099a commit db6c136
Show file tree
Hide file tree
Showing 15 changed files with 1,106 additions and 177 deletions.

This file was deleted.

4 changes: 2 additions & 2 deletions GitHubDarkMode Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSExtension</key>
Expand Down
25 changes: 1 addition & 24 deletions GitHubDarkMode Extension/SafariExtensionHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,4 @@

import SafariServices

class SafariExtensionHandler: SFSafariExtensionHandler {

override func messageReceived(withName messageName: String, from page: SFSafariPage, userInfo: [String : Any]?) {
// This method will be called when a content script provided by your extension calls safari.extension.dispatchMessage("message").
page.getPropertiesWithCompletionHandler { properties in
NSLog("The extension received a message (\(messageName)) from a script injected into (\(String(describing: properties?.url))) with userInfo (\(userInfo ?? [:]))")
}
}

override func toolbarItemClicked(in window: SFSafariWindow) {
// This method will be called when your toolbar item is clicked.
NSLog("The extension's toolbar item was clicked")
}

override func validateToolbarItem(in window: SFSafariWindow, validationHandler: @escaping ((Bool, String) -> Void)) {
// This is called when Safari's state changed in some way that would require the extension's toolbar item to be validated again.
validationHandler(true, "")
}

override func popoverViewController() -> SFSafariExtensionViewController {
return SafariExtensionViewController.shared
}

}
final class SafariExtensionHandler: SFSafariExtensionHandler {}
19 changes: 0 additions & 19 deletions GitHubDarkMode Extension/SafariExtensionViewController.swift

This file was deleted.

Binary file removed GitHubDarkMode Extension/ToolbarItemIcon.pdf
Binary file not shown.
1,060 changes: 1,019 additions & 41 deletions GitHubDarkMode Extension/script.js

Large diffs are not rendered by default.

This file was deleted.

48 changes: 23 additions & 25 deletions GitHubDarkMode.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 53;
objects = {

/* Begin PBXBuildFile section */
Expand All @@ -15,10 +15,7 @@
BF4F7E0324F4C33E009EF13B /* GitHubDarkMode Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = BF4F7E0224F4C33E009EF13B /* GitHubDarkMode Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
BF4F7E0824F4C33E009EF13B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF4F7E0724F4C33E009EF13B /* Cocoa.framework */; };
BF4F7E0B24F4C33E009EF13B /* SafariExtensionHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF4F7E0A24F4C33E009EF13B /* SafariExtensionHandler.swift */; };
BF4F7E0D24F4C33E009EF13B /* SafariExtensionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF4F7E0C24F4C33E009EF13B /* SafariExtensionViewController.swift */; };
BF4F7E1024F4C33E009EF13B /* SafariExtensionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF4F7E0E24F4C33E009EF13B /* SafariExtensionViewController.xib */; };
BF4F7E1324F4C33E009EF13B /* script.js in Resources */ = {isa = PBXBuildFile; fileRef = BF4F7E1224F4C33E009EF13B /* script.js */; };
BF4F7E1524F4C33E009EF13B /* ToolbarItemIcon.pdf in Resources */ = {isa = PBXBuildFile; fileRef = BF4F7E1424F4C33E009EF13B /* ToolbarItemIcon.pdf */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -46,6 +43,8 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
075C15B2254000F50098F1C2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = "<group>"; };
075C15BB2540039E0098F1C2 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = "<group>"; };
BF4F7DEF24F4C33D009EF13B /* GitHubDarkMode.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GitHubDarkMode.app; sourceTree = BUILT_PRODUCTS_DIR; };
BF4F7DF224F4C33D009EF13B /* GitHubDarkMode.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GitHubDarkMode.entitlements; sourceTree = "<group>"; };
BF4F7DF424F4C33D009EF13B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -56,14 +55,10 @@
BF4F7E0224F4C33E009EF13B /* GitHubDarkMode Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "GitHubDarkMode Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
BF4F7E0724F4C33E009EF13B /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
BF4F7E0A24F4C33E009EF13B /* SafariExtensionHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafariExtensionHandler.swift; sourceTree = "<group>"; };
BF4F7E0C24F4C33E009EF13B /* SafariExtensionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafariExtensionViewController.swift; sourceTree = "<group>"; };
BF4F7E0F24F4C33E009EF13B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/SafariExtensionViewController.xib; sourceTree = "<group>"; };
BF4F7E1124F4C33E009EF13B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
BF4F7E1224F4C33E009EF13B /* script.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = script.js; sourceTree = "<group>"; };
BF4F7E1424F4C33E009EF13B /* ToolbarItemIcon.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = ToolbarItemIcon.pdf; sourceTree = "<group>"; };
BF4F7E1624F4C33E009EF13B /* GitHubDarkMode_Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GitHubDarkMode_Extension.entitlements; sourceTree = "<group>"; };
BFCCD0FE24F4CDA500826EBB /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Main.strings"; sourceTree = "<group>"; };
BFCCD0FF24F4CDA500826EBB /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/SafariExtensionViewController.strings"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -129,11 +124,8 @@
isa = PBXGroup;
children = (
BF4F7E0A24F4C33E009EF13B /* SafariExtensionHandler.swift */,
BF4F7E0C24F4C33E009EF13B /* SafariExtensionViewController.swift */,
BF4F7E0E24F4C33E009EF13B /* SafariExtensionViewController.xib */,
BF4F7E1124F4C33E009EF13B /* Info.plist */,
BF4F7E1224F4C33E009EF13B /* script.js */,
BF4F7E1424F4C33E009EF13B /* ToolbarItemIcon.pdf */,
BF4F7E1624F4C33E009EF13B /* GitHubDarkMode_Extension.entitlements */,
);
path = "GitHubDarkMode Extension";
Expand Down Expand Up @@ -184,8 +176,9 @@
BF4F7DE724F4C33D009EF13B /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1160;
LastUpgradeCheck = 1160;
LastUpgradeCheck = 1200;
ORGANIZATIONNAME = "Louis Studio";
TargetAttributes = {
BF4F7DEE24F4C33D009EF13B = {
Expand All @@ -197,13 +190,14 @@
};
};
buildConfigurationList = BF4F7DEA24F4C33D009EF13B /* Build configuration list for PBXProject "GitHubDarkMode" */;
compatibilityVersion = "Xcode 9.3";
compatibilityVersion = "Xcode 11.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
"zh-Hans",
de,
);
mainGroup = BF4F7DE624F4C33D009EF13B;
productRefGroup = BF4F7DF024F4C33D009EF13B /* Products */;
Expand Down Expand Up @@ -231,8 +225,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BF4F7E1524F4C33E009EF13B /* ToolbarItemIcon.pdf in Resources */,
BF4F7E1024F4C33E009EF13B /* SafariExtensionViewController.xib in Resources */,
BF4F7E1324F4C33E009EF13B /* script.js in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -253,7 +245,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BF4F7E0D24F4C33E009EF13B /* SafariExtensionViewController.swift in Sources */,
BF4F7E0B24F4C33E009EF13B /* SafariExtensionHandler.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -274,19 +265,12 @@
children = (
BF4F7DF724F4C33D009EF13B /* Base */,
BFCCD0FE24F4CDA500826EBB /* zh-Hans */,
075C15B2254000F50098F1C2 /* en */,
075C15BB2540039E0098F1C2 /* de */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
BF4F7E0E24F4C33E009EF13B /* SafariExtensionViewController.xib */ = {
isa = PBXVariantGroup;
children = (
BF4F7E0F24F4C33E009EF13B /* Base */,
BFCCD0FF24F4CDA500826EBB /* zh-Hans */,
);
name = SafariExtensionViewController.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
Expand Down Expand Up @@ -317,6 +301,7 @@
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;
Expand Down Expand Up @@ -378,6 +363,7 @@
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;
Expand Down Expand Up @@ -409,7 +395,9 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = "GitHubDarkMode Extension/GitHubDarkMode_Extension.entitlements";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = N5R4643XP6;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "GitHubDarkMode Extension/Info.plist";
Expand All @@ -418,6 +406,7 @@
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
MARKETING_VERSION = 0.1.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.louisstudio.GitHubDarkMode-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -429,7 +418,9 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_ENTITLEMENTS = "GitHubDarkMode Extension/GitHubDarkMode_Extension.entitlements";
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = N5R4643XP6;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = "GitHubDarkMode Extension/Info.plist";
Expand All @@ -438,6 +429,7 @@
"@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks",
);
MARKETING_VERSION = 0.1.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.louisstudio.GitHubDarkMode-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -451,15 +443,18 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = GitHubDarkMode/GitHubDarkMode.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = N5R4643XP6;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = GitHubDarkMode/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 0.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.louisstudio.GitHubDarkMode;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -472,15 +467,18 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = GitHubDarkMode/GitHubDarkMode.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = N5R4643XP6;
ENABLE_HARDENED_RUNTIME = YES;
INFOPLIST_FILE = GitHubDarkMode/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 0.1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.louisstudio.GitHubDarkMode;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1160"
LastUpgradeVersion = "1200"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1160"
LastUpgradeVersion = "1200"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
12 changes: 1 addition & 11 deletions GitHubDarkMode/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,4 @@
import Cocoa

@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {

func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
}

func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}

}
final class AppDelegate: NSObject, NSApplicationDelegate {}
10 changes: 4 additions & 6 deletions GitHubDarkMode/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16097.2"/>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17156"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -150,13 +151,10 @@ DQ
<constraint firstItem="ZLV-xE-AGT" firstAttribute="leading" secondItem="m2S-Jp-Qdl" secondAttribute="leading" id="mT6-ee-vkp"/>
</constraints>
</view>
<connections>
<outlet property="appNameLabel" destination="EB0-ac-UZR" id="SDO-j1-PQa"/>
</connections>
</viewController>
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="655"/>
<point key="canvasLocation" x="75" y="705"/>
</scene>
</scenes>
<resources>
Expand Down
4 changes: 2 additions & 2 deletions GitHubDarkMode/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>0.1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>LSMinimumSystemVersion</key>
Expand Down
Loading

0 comments on commit db6c136

Please sign in to comment.