Skip to content

Commit 918e345

Browse files
committed
Minor MacOS app fix
It should display the status of the extension correctly now
1 parent 99e3386 commit 918e345

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

src/background/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// log some info
22
browser.runtime.getPlatformInfo().then(async platformInfo => {
3-
const browserInfo = await browser.runtime.getBrowserInfo()
3+
const browserInfo = browser.runtime.getBrowserInfo ? await browser.runtime.getBrowserInfo() : "Can't get browser info"
44
console.info(platformInfo, browserInfo);
55
});
66

xcode/MarkDownload - Markdown Web Clipper/MarkDownload - Markdown Web Clipper.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
F879552F27BCCC7700571DA8 /* shared in Resources */ = {isa = PBXBuildFile; fileRef = F879552D27BCCBF900571DA8 /* shared */; };
1011
F88D6F4425DDEF08001F90AF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88D6F4325DDEF08001F90AF /* AppDelegate.swift */; };
1112
F88D6F4725DDEF08001F90AF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F88D6F4525DDEF08001F90AF /* Main.storyboard */; };
1213
F88D6F4925DDEF08001F90AF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F88D6F4825DDEF08001F90AF /* ViewController.swift */; };
@@ -48,6 +49,7 @@
4849
/* End PBXCopyFilesBuildPhase section */
4950

5051
/* Begin PBXFileReference section */
52+
F879552D27BCCBF900571DA8 /* shared */ = {isa = PBXFileReference; lastKnownFileType = folder; name = shared; path = ../../../src/shared; sourceTree = "<group>"; };
5153
F88D6F3F25DDEF08001F90AF /* MarkDownload - Markdown Web Clipper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "MarkDownload - Markdown Web Clipper.app"; sourceTree = BUILT_PRODUCTS_DIR; };
5254
F88D6F4225DDEF08001F90AF /* MarkDownload___Markdown_Web_Clipper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "MarkDownload___Markdown_Web_Clipper.entitlements"; sourceTree = "<group>"; };
5355
F88D6F4325DDEF08001F90AF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -142,6 +144,7 @@
142144
F88D6F6625DDEF0B001F90AF /* Resources */ = {
143145
isa = PBXGroup;
144146
children = (
147+
F879552D27BCCBF900571DA8 /* shared */,
145148
F88D6F6725DDEF0B001F90AF /* background */,
146149
F88D6F6825DDEF0B001F90AF /* options */,
147150
F88D6F6925DDEF0B001F90AF /* popup */,
@@ -243,6 +246,7 @@
243246
isa = PBXResourcesBuildPhase;
244247
buildActionMask = 2147483647;
245248
files = (
249+
F879552F27BCCC7700571DA8 /* shared in Resources */,
246250
F88D6F7125DDEF0B001F90AF /* browser-polyfill.min.js in Resources */,
247251
F88D6F7025DDEF0B001F90AF /* popup in Resources */,
248252
F88D6F6E25DDEF0B001F90AF /* background in Resources */,

xcode/MarkDownload - Markdown Web Clipper/MarkDownload - Markdown Web Clipper/Base.lproj/Main.storyboard

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="16085" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="16085"/>
4+
<deployment identifier="macosx"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
56
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
67
</dependencies>
78
<scenes>
@@ -66,7 +67,7 @@
6667
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
6768
</connections>
6869
</application>
69-
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModuleProvider="target"/>
70+
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="MarkDownload___Markdown_Web_Clipper" customModuleProvider="target"/>
7071
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
7172
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
7273
</objects>
@@ -96,7 +97,7 @@
9697
<!--View Controller-->
9798
<scene sceneID="hIz-AP-VOD">
9899
<objects>
99-
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
100+
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModule="MarkDownload___Markdown_Web_Clipper" customModuleProvider="target" sceneMemberID="viewController">
100101
<view key="view" id="m2S-Jp-Qdl">
101102
<rect key="frame" x="0.0" y="0.0" width="480" height="344"/>
102103
<autoresizingMask key="autoresizingMask"/>
@@ -105,22 +106,22 @@
105106
<rect key="frame" x="0.0" y="34" width="480" height="265"/>
106107
<subviews>
107108
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="FWV-e2-WQh" userLabel="IconView">
108-
<rect key="frame" x="176" y="137" width="128" height="128"/>
109+
<rect key="frame" x="176" y="136" width="128" height="129"/>
109110
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" image="AppIcon" id="Hhb-TZ-Dhg"/>
110111
</imageView>
111112
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="EB0-ac-UZR">
112-
<rect key="frame" x="38" y="63" width="404" height="32"/>
113+
<rect key="frame" x="38" y="62" width="404" height="32"/>
113114
<constraints>
114115
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="400" id="pZE-0p-Ce8"/>
115116
</constraints>
116-
<textFieldCell key="cell" alignment="center" title="App Name's extension is currently off. You can turn it on in Safari Extensions preferences." id="S7v-7o-3vW">
117+
<textFieldCell key="cell" alignment="center" title="MarkDownload - Markdown Web Clipper's extension is currently off. You can turn it on in Safari Extensions preferences." id="S7v-7o-3vW">
117118
<font key="font" metaFont="system"/>
118119
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
119120
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
120121
</textFieldCell>
121122
</textField>
122123
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ooh-eV-eLQ">
123-
<rect key="frame" x="79" y="-7" width="322" height="32"/>
124+
<rect key="frame" x="82" y="-7" width="316" height="32"/>
124125
<buttonCell key="cell" type="push" title="Quit and Open Safari Extensions Preferences…" alternateTitle="Install" bezelStyle="rounded" alignment="center" lineBreakMode="truncatingMiddle" state="on" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Srx-0j-A4D">
125126
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
126127
<font key="font" metaFont="system"/>

xcode/MarkDownload - Markdown Web Clipper/MarkDownload - Markdown Web Clipper/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import SafariServices.SFSafariApplication
1010
import SafariServices.SFSafariExtensionManager
1111

1212
let appName = "MarkDownload - Markdown Web Clipper"
13-
let extensionBundleIdentifier = "au.death.MarkDownload---Markdown-Web-Clipper.Extension"
13+
let extensionBundleIdentifier = "au.death.MarkDownload.Extension"
1414

1515
class ViewController: NSViewController {
1616

0 commit comments

Comments
 (0)