[rs-commit] r26 - in /redwax-signtext/trunk/src/macos/Redwax SignText: Redwax SignText Extension/ Redwax SignText Extension/Resources/ Redwax SignText Extension/Resources/_locales/ Redwax SignText Extension/Resources/_locales/en/ Redwax SignText Extension/Resources/images/ Redwax SignText Firefox Extension/ Redwax SignText Firefox Extension/Resources/ Redwax SignText Firefox Extension/Resources/_locales/ Redwax SignText Firefox Extension/Resources/_locales/en/ Redwax SignText.xcodeproj/ Redwax SignText.xcodeproj/project.xcworkspace/ Redwax SignText.xcodeproj/project.xcworkspace/xcshareddata/ Redwax SignText.xcodeproj/project.xcworkspace/xcuserdata/ Redwax SignText.xcodeproj/project.xcworkspace/xcuserdata/minfrin.xcuserdatad/ Redwax SignText.xcodeproj/xcuserdata/ Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/ Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcdebugger/ Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcschemes/ Redwax SignText/ Redwax SignText/Assets.xcassets/ Redwax SignText/Assets.xcassets/AccentColor.colorset/ Redwax SignText/Assets.xcassets/AppIcon.appiconset/ Redwax SignText/Assets.xcassets/LargeIcon.imageset/ Redwax SignText/Base.lproj/ Redwax SignText/Resources/ Redwax SignTextTests/ Redwax SignTextUITests/

rs-commit at redwax.eu rs-commit at redwax.eu
Wed Sep 22 11:14:42 CEST 2021


Author: minfrin at redwax.eu
Date: Wed Sep 22 11:14:40 2021
New Revision: 26

Log:
Initial add of XCode project for MacOS.

Added:
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Info.plist
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/_locales/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/_locales/en/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/_locales/en/messages.json   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/background.js
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/content.js
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-128.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-256.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-48.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-512.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-64.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-96.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-16.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-19.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-32.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-38.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/manifest.json   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.css
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.html
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.js
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/signtext.js
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SafariWebExtensionHandler.h
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SafariWebExtensionHandler.m
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SignText.storyboard
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/_locales/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/_locales/en/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/_locales/en/messages.json   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/background.js
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/content.js
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/manifest.json   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.pbxproj
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/contents.xcworkspacedata
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/xcshareddata/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/xcuserdata/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/xcuserdata/minfrin.xcuserdatad/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/xcuserdata/minfrin.xcuserdatad/UserInterfaceState.xcuserstate   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcdebugger/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcschemes/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcschemes/xcschememanagement.plist
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/AppDelegate.h
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/AppDelegate.m
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/AccentColor.colorset/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/AccentColor.colorset/Contents.json   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/AppIcon.appiconset/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/AppIcon.appiconset/Contents.json   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/Contents.json   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/LargeIcon.imageset/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/LargeIcon.imageset/Contents.json   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Base.lproj/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Base.lproj/Main.html
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Base.lproj/Main.storyboard
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Redwax SignText.entitlements
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Icon.png   (with props)
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Script.js
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Style.css
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/ViewController.h
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/ViewController.m
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/main.m
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignTextTests/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignTextTests/Redwax_SignTextTests.m
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignTextUITests/
    redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignTextUITests/Redwax_SignTextUITests.m

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Info.plist
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Info.plist	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Info.plist	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>NSExtension</key>
+	<dict>
+		<key>NSExtensionPointIdentifier</key>
+		<string>com.apple.Safari.web-extension</string>
+		<key>NSExtensionPrincipalClass</key>
+		<string>SafariWebExtensionHandler</string>
+	</dict>
+</dict>
+</plist>

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/_locales/en/messages.json
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/_locales/en/messages.json
------------------------------------------------------------------------------
    svn:mime-type = application/json

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/background.js
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/background.js	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/background.js	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,73 @@
+
+console.log('Redwax SignText: background started');
+
+var csPorts = [];
+var nativePort;
+
+function nativeMessaged(m) {
+    /*
+     * Native message response is handled here. Send the message
+     * to the correctly numbered content script.
+     */
+    window.csPorts.forEach(p => {
+        if (p.sender.tab.id == m.id) {
+            p.postMessage({ uuid: m.uuid, response: m.response, contentType: m.contentType });
+        }
+    });
+}
+
+function nativeDisconnected(p) {
+    window.nativePort.disconnect();
+    window.nativePort = undefined;
+    console.log('Redwax SignText: native port disconnected.');
+}
+
+function connected(p) {
+    window.csPorts[p.sender.tab.id] = p;
+    p.onMessage.addListener(function(m) {
+        
+        try {
+            /*
+             * Let's try send the message on the assumption the port is
+             * open and works. On failure, try to open the port and retry.
+             */
+            window.nativePort.postMessage({ id: p.sender.tab.id, uuid: m.uuid, request: m.request, contentType: m.contentType });
+        }
+        catch (exception) {
+            
+            /*
+             * Not able to send the message. (Re)open the port and try
+             * once more.
+             */
+            window.nativePort = browser.runtime.connectNative('Redwax-SignText');
+            window.nativePort.onMessage.addListener(nativeMessaged);
+            window.nativePort.onDisconnect.addListener(nativeDisconnected);
+            
+            /*
+             * One more try to send the message.
+             */
+            try {
+                window.nativePort.postMessage({ id: p.sender.tab.id, uuid: m.uuid, request: m.request, contentType: m.contentType });
+            }
+            catch (exception) {
+                
+                /*
+                 * No luck, send a message back to the content script with
+                 * the bad news.
+                 */
+                p.postMessage({ uuid: m.uuid, error: 'error:postNativeMessageFailed', exception: exception });
+                
+            }
+            
+        }
+        
+    });
+    p.onDisconnect.addListener(function(p) {
+        console.log('Redwax SignText: tab ' + p.sender.tab.id + ' disconnected.');
+        delete csPorts[p.sender.tab.id];
+    });
+}
+
+browser.runtime.onConnect.addListener(connected);
+
+console.log('Redwax SignText: background ended');

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/content.js
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/content.js	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/content.js	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,130 @@
+
+
+/*
+ * Handle all background script events, passing them as
+ * appropriate to the webpage.
+ */
+const port = browser.runtime.connect({ name: window.location.origin });
+
+port.onMessage.addListener((message) => {
+    document.dispatchEvent(new CustomEvent('eu.redwax.signTextResponse', { bubbles: true, detail: message }));
+});
+
+port.onDisconnect.addListener((p) => {
+  if (p.error) {
+    console.log(`Redwax SignText: disconnected due to an error: ${p.error.message}`);
+  }
+  else {
+      console.log(`Redwax SignText: disconnected`);
+  }
+});
+
+
+/*
+ * Handle all webpage signtext info events, return our version
+ * information.
+ */
+document.addEventListener('eu.redwax.signTextRequestInfo', function (e) {
+    /*
+     * We've been asked for info about the signtext extension.
+     *
+     * This can be used to detect support for the extension
+     * before trying to use it.
+     */
+    const manifest = browser.runtime.getManifest();
+    e.target.dispatchEvent(new CustomEvent('eu.redwax.signTextResponseInfo', { bubbles: true, detail: { name: manifest.name, version: manifest.version } }));
+
+});
+
+/*
+ * Handle all webpage signtext events, passing them as approriate
+ * to the background script.
+ */
+document.addEventListener('eu.redwax.signTextRequest', function (e) {
+    /*
+     * We've been asked to sign a specific request. Check the
+     * request, and pass the request to the background if the
+     * check passes.
+     */
+    if (e.detail.request) {
+
+        /*
+         * UUID valid? If not, complain.
+         */
+        if (typeof e.detail.uuid !== 'string') {
+            /* error - uuid is missing or invalid */
+            e.target.dispatchEvent(new CustomEvent('eu.redwax.signTextResponse', { bubbles: true, detail: { uuid: e.detail.uuid, error: 'error:uuidInvalid' } }));
+        }
+
+        /*
+         * Content Type valid? If not, complain.
+         */
+        switch (e.detail.contentType) {
+            case undefined:
+            case 'text/plain':
+            case 'application/pkcs7-mime': {
+
+                /*
+                 * Checks have passed, send message to background script.
+                 */
+                try {
+                    port.postMessage({ uuid: e.detail.uuid, request: e.detail.request, contentType: e.detail.contentType });
+                }
+                catch (exception) {
+                    e.target.dispatchEvent(new CustomEvent('eu.redwax.signTextResponse', { bubbles: true, detail: { uuid: e.detail.uuid, error: 'error:postMessageFailed', exception: exception } }));
+                }
+
+                break;
+            }
+            default: {
+                /* error - mime type unrecognised */
+                e.target.dispatchEvent(new CustomEvent('eu.redwax.signTextResponse', { bubbles: true, detail: { uuid: e.detail.uuid, error: 'error:contentTypeUnrecognised' } }));
+            }
+        }
+
+    }
+});
+
+// export
+crypto.signText = function(text, options, ...CAs) {
+
+    /* legacy - pass a string, we return a string */
+    if (typeof text === 'text') {
+        var requestStream = new ReadableStream({
+            read() {
+                this.push(text);
+                this.push(null);
+            }
+        });
+    }
+    /* consume a ReadableStream */
+    else if (text instanceof ReadableStream) {
+        var requestStream = text;
+    }
+    else {
+        // error - parameter not recognised
+    }
+
+    let context = {
+        message: "signText",
+        options: options,
+        CAs: CAs,
+        protocol: location.protocol,
+        hostname: location.hostname
+    };
+
+    const responseStream = new ReadableStream(
+                    new SignTextResponse(context, requestStream));
+
+    /* legacy - pass a string, we return a string */
+    if (typeof text === 'text') {
+        return new Response(responseStream).text();
+    }
+    /* return a ReadableStream */
+    else {
+        return responseStream;
+    }
+
+}
+
+//export function(signText, window.crypto, {defineAs: "signText"});

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-128.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-128.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-256.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-256.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-48.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-48.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-512.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-512.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-64.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-64.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-96.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/icon-96.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-16.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-16.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-19.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-19.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-32.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-32.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-38.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/images/toolbar-icon-38.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/manifest.json
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/manifest.json
------------------------------------------------------------------------------
    svn:mime-type = application/json

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.css
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.css	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.css	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,15 @@
+:root {
+    color-scheme: light dark;
+}
+
+body {
+    width: 100px;
+    padding: 10px;
+
+    font-family: system-ui;
+    text-align: center;
+}
+
+ at media (prefers-color-scheme: dark) {
+    /* Dark Mode styles go here. */
+}

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.html
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.html	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.html	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="UTF-8">
+    <link rel="stylesheet" href="popup.css">
+    <script type="module" src="popup.js"></script>
+</head>
+<body>
+    <strong>Hello World!</strong>
+</body>
+</html>

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.js
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.js	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/popup.js	Wed Sep 22 11:14:40 2021
@@ -0,0 +1 @@
+console.log("Hello World!", browser);

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/signtext.js
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/signtext.js	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/Resources/signtext.js	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,131 @@
+
+function stringReader(str) {
+  var offset = 0;
+  const chunkSize = 1024;
+  return new ReadableStream({
+    pull(controller) {
+      var nextOffset = offset+chunkSize;
+      if (nextOffset >= str.length) {
+        nextOffset = str.length;
+        controller.enqueue(str.substring(offset, nextOffset));
+        controller.close();
+      }
+      else {
+        controller.enqueue(str.substring(offset, nextOffset));
+      }
+      offset = nextOffset;
+    }
+  });
+}
+
+
+function uuidv4() {
+  return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>
+    (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
+  );
+}
+
+function signTextReader(requestStream, options, ...CAs) {
+  const uuid = uuidv4();
+  const reader = requestStream.getReader();
+  return new ReadableStream({
+    start(controller) {
+
+      function push() {
+        reader.read().then(({ done, value }) => {
+          if (!done) {
+            document.dispatchEvent(new CustomEvent('eu.redwax.signTextRequest', { bubbles: true, detail: { contentType: 'text/plain', uuid: uuid, request: value } }));
+          }
+          else {
+            document.dispatchEvent(new CustomEvent('eu.redwax.signTextRequest', { bubbles: true, detail: { uuid: uuid, request: { signText: options, CAs: CAs } } }));
+          }
+        });
+      }
+
+      const signTextHandler = function (e) {
+        if (e.detail.uuid === uuid) {
+          /* an error was received, cancel the stream */
+          if (e.detail.error) {
+            controller.cancel(e.detail.error);
+            document.removeEventListener('eu.redwax.signTextResponse', signTextHandler);
+          }
+          /* an ack was received, send the next chunk */
+          else if (e.detail.response === true) {
+            push();
+          }
+          /* an eos was received, we're done */
+          else if (e.detail.response === false) {
+            controller.close();
+            document.removeEventListener('eu.redwax.signTextResponse', signTextHandler);
+          }
+          /* a response was received, enqueue the response */
+          else {
+            controller.enqueue(e.detail.response);
+            document.dispatchEvent(new CustomEvent('eu.redwax.signTextRequest', { bubbles: true, detail: { uuid: uuid, request: true } }));
+          }
+        }
+      };
+
+      /* add our listener */
+      document.addEventListener('eu.redwax.signTextResponse', signTextHandler);
+
+      /* fire off initial request */
+      push();
+
+    }
+  });
+}
+
+async function readerStreamToString(stream) {
+  const reader = stream.getReader();
+  let result = '';
+  return reader.read().then(function processText({ done, value }) {
+    if (done) {
+      console.log("Stream complete:" + result);
+      return result;
+    }
+    result += value;
+    return reader.read().then(processText);
+  });
+}
+
+window.crypto.signText = async function SignText(source, options, ...CAs) {
+
+    var requestStream;
+
+    /* source is undefined, return the info */
+    if (typeof source === 'undefined') {
+        return new Promise(resolve => {
+            document.addEventListener('eu.redwax.signTextResponseInfo', resolve, {once:true});
+            document.dispatchEvent(new CustomEvent('eu.redwax.signTextRequestInfo', { bubbles: true }));
+        }).then( e => { return e.detail; });
+    }
+
+    /* pass a string, we return a string */
+    if (typeof source === 'string') {
+        var requestStream = stringReader(source);
+    }
+
+    /* consume a ReadableStream */
+    else if (source instanceof ReadableStream) {
+        var requestStream = source;
+    }
+
+    else {
+        return Promise.reject(new Error('error:unknownType'));
+    }
+
+    const responseStream = new signTextReader(requestStream, options, CAs);
+
+    /* pass a string, we return a string */
+    if (typeof source === 'string') {
+      return readerStreamToString(responseStream);
+    }
+
+    /* return a ReadableStream */
+    else {
+        return responseStream;
+    }
+
+}
+

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SafariWebExtensionHandler.h
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SafariWebExtensionHandler.h	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SafariWebExtensionHandler.h	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,12 @@
+//
+//  SafariWebExtensionHandler.h
+//  Redwax SignText Extension
+//
+//  Created by Graham Leggett on 2021/08/10.
+//
+
+#import <Foundation/Foundation.h>
+
+ at interface SafariWebExtensionHandler : NSObject <NSExtensionRequestHandling>
+
+ at end

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SafariWebExtensionHandler.m
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SafariWebExtensionHandler.m	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SafariWebExtensionHandler.m	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,114 @@
+//
+//  SafariWebExtensionHandler.m
+//  Redwax SignText Extension
+//
+//  Created by Graham Leggett on 2021/08/10.
+//
+
+#import "SafariWebExtensionHandler.h"
+
+#import <SafariServices/SafariServices.h>
+
+#import <Cocoa/Cocoa.h>
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED < 110000
+NSString * const SFExtensionMessageKey = @"message";
+#endif
+
+ at implementation SafariWebExtensionHandler
+
+- (void)beginRequestWithExtensionContext:(NSExtensionContext *)context {
+
+    NSExtensionItem *response = [[NSExtensionItem alloc] init];
+
+    id message = [context.inputItems.firstObject userInfo][SFExtensionMessageKey];
+    NSLog(@"Received message from browser.runtime.sendNativeMessage: %@", message);
+
+    /*
+     * Message ID? If not, error.
+     */
+    id messageId = message[@"id"];
+    if (messageId == NULL) {
+        NSLog(@"Redwax SignText Extension: message ID is missing, skipping.");
+        response.userInfo = @{ SFExtensionMessageKey: @{ @"error": @"error:missingId" } };
+        [context completeRequestReturningItems:@[ response ] completionHandler:nil];
+        return;
+    }
+
+    /*
+     * Message UUID? If not, error.
+     */
+    id messageUuid = message[@"uuid"];
+    if (messageUuid == NULL) {
+        NSLog(@"Redwax SignText Extension: message UUID is missing, skipping.");
+        response.userInfo = @{ SFExtensionMessageKey: @{ @"id": messageId, @"error": @"error:missingUuid" } };
+        [context completeRequestReturningItems:@[ response ] completionHandler:nil];
+        return;
+    }
+
+
+    id messageRequest = message[@"request"];
+
+    /*
+     * Incoming data to sign.
+     */
+    if ([messageRequest isKindOfClass:[NSString class]]) {
+        /*
+         * Message Content-Type? If not, error.
+         */
+        id messageContentType = message[@"contentType"];
+        if (messageContentType == NULL) {
+            NSLog(@"Redwax SignText Extension: message Content-Type is missing, skipping.");
+            response.userInfo = @{ SFExtensionMessageKey: @{ @"id": messageId, @"uuid": messageUuid, @"error": @"error:missingContentType" } };
+            [context completeRequestReturningItems:@[ response ] completionHandler:nil];
+            return;
+        }
+        else {
+            response.userInfo = @{ SFExtensionMessageKey: @{ @"id": messageId, @"uuid": messageUuid, @"response": @YES } };
+            [context completeRequestReturningItems:@[ response ] completionHandler:nil];
+            return;
+        }
+
+    }
+
+    /*
+     * No more incoming data, do the sign.
+     */
+    else if ([messageRequest isKindOfClass:[NSDictionary class]]) {
+        // do the sign, return the first chunk
+
+        response.userInfo = @{ SFExtensionMessageKey: @{ @"id": messageId, @"uuid": messageUuid, @"contentType": @"application/pkcs7-mime", @"response": @"Signed text" } };
+        [context completeRequestReturningItems:@[ response ] completionHandler:nil];
+        return;
+
+    }
+
+    /*
+     * No more outgoing data, we're done.
+     */
+    else if ([messageRequest isKindOfClass:[NSNumber class]]) {
+        // no more chunks to return, we're done
+
+        response.userInfo = @{ SFExtensionMessageKey: @{ @"id": messageId, @"uuid": messageUuid, @"response": @NO } };
+        [context completeRequestReturningItems:@[ response ] completionHandler:nil];
+        return;
+    }
+
+    /*
+     * Not a clue, sorry.
+     */
+    else {
+        response.userInfo = @{ SFExtensionMessageKey: @{ @"id": messageId, @"uuid": messageUuid, @"error": @"error:requestUnrecognised" } };
+        [context completeRequestReturningItems:@[ response ] completionHandler:nil];
+        return;
+    }
+
+
+//    NSAlert* alert = [[NSAlert alloc]init];
+//    [alert setMessageText:message[@"request"]];
+//    [alert setInformativeText:@"Hello"];
+//    [alert runModal];
+
+}
+
+ at end

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SignText.storyboard
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SignText.storyboard	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Extension/SignText.storyboard	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19158" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19158"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="PEd-7d-5j0">
+            <objects>
+                <viewController id="bU7-R8-ocO" sceneMemberID="viewController">
+                    <view key="view" id="tOy-S4-hL0">
+                        <rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                        <subviews>
+                            <stackView distribution="fill" orientation="vertical" alignment="leading" horizontalStackHuggingPriority="249.99998474121094" verticalStackHuggingPriority="249.99998474121094" fixedFrame="YES" detachesHiddenViews="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zea-9U-VkK">
+                                <rect key="frame" x="170" y="50" width="110" height="200"/>
+                                <autoresizingMask key="autoresizingMask"/>
+                            </stackView>
+                        </subviews>
+                    </view>
+                </viewController>
+                <customObject id="9uD-mB-xHs" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="14" y="118"/>
+        </scene>
+        <!--Tab View Controller-->
+        <scene sceneID="M0a-Am-Y6Z">
+            <objects>
+                <tabViewController selectedTabViewItemIndex="0" id="Yjw-k1-vWo" sceneMemberID="viewController">
+                    <tabViewItems>
+                        <tabViewItem identifier="" id="Vmp-Y3-Xu9"/>
+                        <tabViewItem identifier="" id="GYt-cO-0kN"/>
+                    </tabViewItems>
+                    <tabView key="tabView" type="noTabsNoBorder" id="HzI-ZP-1Og">
+                        <rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                        <font key="font" metaFont="message"/>
+                        <connections>
+                            <outlet property="delegate" destination="Yjw-k1-vWo" id="fRI-yM-Y5e"/>
+                        </connections>
+                    </tabView>
+                    <connections>
+                        <outlet property="tabView" destination="HzI-ZP-1Og" id="XR6-eg-yEY"/>
+                        <segue destination="ewn-w6-sbj" kind="relationship" relationship="tabItems" id="kTA-Tf-SBW"/>
+                        <segue destination="DqO-5H-mx0" kind="relationship" relationship="tabItems" id="Y2e-I2-xQe"/>
+                    </connections>
+                </tabViewController>
+                <customObject id="WTd-dE-eZD" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-125" y="-290"/>
+        </scene>
+        <!--View Controller-->
+        <scene sceneID="7E2-bp-BN5">
+            <objects>
+                <viewController id="ewn-w6-sbj" sceneMemberID="viewController">
+                    <view key="view" id="gew-Ni-b5P">
+                        <rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </view>
+                </viewController>
+                <customObject id="nbB-JY-47g" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-481" y="-50"/>
+        </scene>
+        <!--View Controller-->
+        <scene sceneID="ws5-Aj-WDI">
+            <objects>
+                <viewController id="DqO-5H-mx0" sceneMemberID="viewController">
+                    <view key="view" id="xOD-xR-6lu">
+                        <rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                    </view>
+                </viewController>
+                <customObject id="I52-oS-Bq6" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="-481" y="-50"/>
+        </scene>
+    </scenes>
+</document>

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/_locales/en/messages.json
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/_locales/en/messages.json
------------------------------------------------------------------------------
    svn:mime-type = application/json

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/background.js
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/background.js	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/background.js	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,6 @@
+browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
+    console.log("Received request: ", request);
+
+    if (request.greeting === "hello")
+        sendResponse({ farewell: "goodbye" });
+});

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/content.js
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/content.js	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/content.js	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,99 @@
+browser.runtime.sendMessage({ greeting: "hello" }).then((response) => {
+    console.log("Received response: ", response);
+});
+
+browser.runtime.onMessage.addListener((request, sender, sendResponse) => {
+    console.log("Received request: ", request);
+});
+
+window.addEventListener("message", (event) => {
+  // Do we trust the sender of this message?
+//  if (event.origin !== "http://example.com:8080")
+//    return;
+
+  // event.source is window.opener
+  // event.data is "hello there!"
+
+  // Assuming you've verified the origin of the received message (which
+  // you must do in any case), a convenient idiom for replying to a
+  // message is to call postMessage on event.source and provide
+  // event.origin as the targetOrigin.
+  event.source.postMessage("hi there " + event.origin + "!  the secret response " +
+                           "is: rheeeeet!",
+                           event.origin);
+}, false);
+
+
+class SignTextResponse {
+
+    constructor(context, stream) {
+        this.context = context;
+        this.stream = stream;
+    }
+
+    start(controller) {
+        console.log("signText: start");
+
+        this.port = browser.runtime.connect({name:"signText"});
+
+        let message = {
+            message: "signText",
+            payload: context
+        };
+
+        this.port.postMessage(message);
+
+    }
+
+    pull(controller) {
+        console.log("signText: pull");
+    }
+
+    cancel(reason) {
+        console.log("signText: cancel");
+    }
+
+}
+
+function signText(text, options, ...CAs) {
+
+    /* legacy - pass a string, we return a string */
+    if (typeof text === 'string') {
+        var requestStream = new ReadableStream({
+            read() {
+                this.push(text);
+                this.push(null);
+            }
+        });
+    }
+    /* consume a ReadableStream */
+    else if (text instanceof ReadableStream) {
+        var requestStream = text;
+    }
+    else {
+        // error - parameter not recognised
+    }
+
+    let context = {
+        message: "signText",
+        options: options,
+        CAs: CAs,
+        protocol: location.protocol,
+        hostname: location.hostname
+    };
+
+    const responseStream = new ReadableStream(
+                    new SignTextResponse(context, requestStream));
+
+    /* legacy - pass a string, we return a string */
+    if (typeof text === 'string') {
+        return new Response(responseStream).text();
+    }
+    /* return a ReadableStream */
+    else {
+        return responseStream;
+    }
+
+}
+
+exportFunction(signText, window.crypto, {defineAs: "signText"});

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/manifest.json
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText Firefox Extension/Resources/manifest.json
------------------------------------------------------------------------------
    svn:mime-type = application/json

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.pbxproj
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.pbxproj	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.pbxproj	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,883 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 55;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		F92E89F326C297BA00CFD6D4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F92E89F226C297BA00CFD6D4 /* AppDelegate.m */; };
+		F92E89F726C297BA00CFD6D4 /* Main.html in Resources */ = {isa = PBXBuildFile; fileRef = F92E89F526C297BA00CFD6D4 /* Main.html */; };
+		F92E89F926C297BA00CFD6D4 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = F92E89F826C297BA00CFD6D4 /* Icon.png */; };
+		F92E89FB26C297BA00CFD6D4 /* Style.css in Resources */ = {isa = PBXBuildFile; fileRef = F92E89FA26C297BA00CFD6D4 /* Style.css */; };
+		F92E89FD26C297BA00CFD6D4 /* Script.js in Resources */ = {isa = PBXBuildFile; fileRef = F92E89FC26C297BA00CFD6D4 /* Script.js */; };
+		F92E8A0026C297BA00CFD6D4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F92E89FF26C297BA00CFD6D4 /* ViewController.m */; };
+		F92E8A0326C297BA00CFD6D4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F92E8A0126C297BA00CFD6D4 /* Main.storyboard */; };
+		F92E8A0526C297BB00CFD6D4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F92E8A0426C297BB00CFD6D4 /* Assets.xcassets */; };
+		F92E8A0726C297BB00CFD6D4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F92E8A0626C297BB00CFD6D4 /* main.m */; };
+		F92E8A1226C297BC00CFD6D4 /* Redwax_SignTextTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F92E8A1126C297BC00CFD6D4 /* Redwax_SignTextTests.m */; };
+		F92E8A1C26C297BC00CFD6D4 /* Redwax_SignTextUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F92E8A1B26C297BC00CFD6D4 /* Redwax_SignTextUITests.m */; };
+		F92E8A2226C297BC00CFD6D4 /* Redwax SignText Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = F92E8A2126C297BC00CFD6D4 /* Redwax SignText Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+		F92E8A2826C297BC00CFD6D4 /* SafariWebExtensionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = F92E8A2726C297BC00CFD6D4 /* SafariWebExtensionHandler.m */; };
+		F92E8A2B26C297BC00CFD6D4 /* _locales in Resources */ = {isa = PBXBuildFile; fileRef = F92E8A2A26C297BC00CFD6D4 /* _locales */; };
+		F92E8A2D26C297BC00CFD6D4 /* images in Resources */ = {isa = PBXBuildFile; fileRef = F92E8A2C26C297BC00CFD6D4 /* images */; };
+		F92E8A2F26C297BC00CFD6D4 /* manifest.json in Resources */ = {isa = PBXBuildFile; fileRef = F92E8A2E26C297BC00CFD6D4 /* manifest.json */; };
+		F92E8A3126C297BC00CFD6D4 /* background.js in Resources */ = {isa = PBXBuildFile; fileRef = F92E8A3026C297BC00CFD6D4 /* background.js */; };
+		F92E8A3326C297BC00CFD6D4 /* content.js in Resources */ = {isa = PBXBuildFile; fileRef = F92E8A3226C297BC00CFD6D4 /* content.js */; };
+		F92E8A3526C297BC00CFD6D4 /* popup.html in Resources */ = {isa = PBXBuildFile; fileRef = F92E8A3426C297BC00CFD6D4 /* popup.html */; };
+		F92E8A3726C297BC00CFD6D4 /* popup.css in Resources */ = {isa = PBXBuildFile; fileRef = F92E8A3626C297BC00CFD6D4 /* popup.css */; };
+		F92E8A3926C297BC00CFD6D4 /* popup.js in Resources */ = {isa = PBXBuildFile; fileRef = F92E8A3826C297BC00CFD6D4 /* popup.js */; };
+		F9E7326E26EBFCB700EFCD90 /* SignText.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F9E7326D26EBFCB700EFCD90 /* SignText.storyboard */; };
+		F9EC6F9B26EFD285004DEC36 /* signtext.js in Resources */ = {isa = PBXBuildFile; fileRef = F9EC6F9A26EFD285004DEC36 /* signtext.js */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		F92E8A0E26C297BC00CFD6D4 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = F92E89E626C297BA00CFD6D4 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = F92E89ED26C297BA00CFD6D4;
+			remoteInfo = "Redwax SignText";
+		};
+		F92E8A1826C297BC00CFD6D4 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = F92E89E626C297BA00CFD6D4 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = F92E89ED26C297BA00CFD6D4;
+			remoteInfo = "Redwax SignText";
+		};
+		F92E8A2326C297BC00CFD6D4 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = F92E89E626C297BA00CFD6D4 /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = F92E8A2026C297BC00CFD6D4;
+			remoteInfo = "Redwax SignText Extension";
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		F92E8A4026C297BC00CFD6D4 /* Embed App Extensions */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 13;
+			files = (
+				F92E8A2226C297BC00CFD6D4 /* Redwax SignText Extension.appex in Embed App Extensions */,
+			);
+			name = "Embed App Extensions";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		F92E89EE26C297BA00CFD6D4 /* Redwax SignText.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Redwax SignText.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		F92E89F126C297BA00CFD6D4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+		F92E89F226C297BA00CFD6D4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+		F92E89F626C297BA00CFD6D4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = Base; path = ../Base.lproj/Main.html; sourceTree = "<group>"; };
+		F92E89F826C297BA00CFD6D4 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
+		F92E89FA26C297BA00CFD6D4 /* Style.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = Style.css; sourceTree = "<group>"; };
+		F92E89FC26C297BA00CFD6D4 /* Script.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = Script.js; sourceTree = "<group>"; };
+		F92E89FE26C297BA00CFD6D4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+		F92E89FF26C297BA00CFD6D4 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+		F92E8A0226C297BA00CFD6D4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		F92E8A0426C297BB00CFD6D4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+		F92E8A0626C297BB00CFD6D4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		F92E8A0826C297BB00CFD6D4 /* Redwax SignText.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Redwax SignText.entitlements"; sourceTree = "<group>"; };
+		F92E8A0D26C297BC00CFD6D4 /* Redwax SignTextTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Redwax SignTextTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
+		F92E8A1126C297BC00CFD6D4 /* Redwax_SignTextTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Redwax_SignTextTests.m; sourceTree = "<group>"; };
+		F92E8A1726C297BC00CFD6D4 /* Redwax SignTextUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Redwax SignTextUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
+		F92E8A1B26C297BC00CFD6D4 /* Redwax_SignTextUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Redwax_SignTextUITests.m; sourceTree = "<group>"; };
+		F92E8A2126C297BC00CFD6D4 /* Redwax SignText Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Redwax SignText Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
+		F92E8A2626C297BC00CFD6D4 /* SafariWebExtensionHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SafariWebExtensionHandler.h; sourceTree = "<group>"; };
+		F92E8A2726C297BC00CFD6D4 /* SafariWebExtensionHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SafariWebExtensionHandler.m; sourceTree = "<group>"; };
+		F92E8A2A26C297BC00CFD6D4 /* _locales */ = {isa = PBXFileReference; lastKnownFileType = folder; path = _locales; sourceTree = "<group>"; };
+		F92E8A2C26C297BC00CFD6D4 /* images */ = {isa = PBXFileReference; lastKnownFileType = folder; path = images; sourceTree = "<group>"; };
+		F92E8A2E26C297BC00CFD6D4 /* manifest.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = manifest.json; sourceTree = "<group>"; };
+		F92E8A3026C297BC00CFD6D4 /* background.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = background.js; sourceTree = "<group>"; };
+		F92E8A3226C297BC00CFD6D4 /* content.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = content.js; sourceTree = "<group>"; };
+		F92E8A3426C297BC00CFD6D4 /* popup.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = popup.html; sourceTree = "<group>"; };
+		F92E8A3626C297BC00CFD6D4 /* popup.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = popup.css; sourceTree = "<group>"; };
+		F92E8A3826C297BC00CFD6D4 /* popup.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = popup.js; sourceTree = "<group>"; };
+		F92E8A3A26C297BC00CFD6D4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		F9E7326D26EBFCB700EFCD90 /* SignText.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = SignText.storyboard; sourceTree = "<group>"; };
+		F9EC6F9A26EFD285004DEC36 /* signtext.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = signtext.js; sourceTree = "<group>"; };
+		F9F7AE8726E8E66B00524705 /* manifest.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = manifest.json; sourceTree = "<group>"; };
+		F9F7AE8826E8E66B00524705 /* content.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = content.js; sourceTree = "<group>"; };
+		F9F7AE8C26E8EAF000524705 /* _locales */ = {isa = PBXFileReference; lastKnownFileType = folder; path = _locales; sourceTree = "<group>"; };
+		F9F7AE8D26E8EAF000524705 /* background.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = background.js; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		F92E89EB26C297BA00CFD6D4 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F92E8A0A26C297BC00CFD6D4 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F92E8A1426C297BC00CFD6D4 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F92E8A1E26C297BC00CFD6D4 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		F92E89E526C297BA00CFD6D4 = {
+			isa = PBXGroup;
+			children = (
+				F9F7AE8626E8DBDE00524705 /* Redwax SignText Firefox Extension */,
+				F92E89F026C297BA00CFD6D4 /* Redwax SignText */,
+				F92E8A1026C297BC00CFD6D4 /* Redwax SignTextTests */,
+				F92E8A1A26C297BC00CFD6D4 /* Redwax SignTextUITests */,
+				F92E8A2526C297BC00CFD6D4 /* Redwax SignText Extension */,
+				F92E89EF26C297BA00CFD6D4 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		F92E89EF26C297BA00CFD6D4 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				F92E89EE26C297BA00CFD6D4 /* Redwax SignText.app */,
+				F92E8A0D26C297BC00CFD6D4 /* Redwax SignTextTests.xctest */,
+				F92E8A1726C297BC00CFD6D4 /* Redwax SignTextUITests.xctest */,
+				F92E8A2126C297BC00CFD6D4 /* Redwax SignText Extension.appex */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		F92E89F026C297BA00CFD6D4 /* Redwax SignText */ = {
+			isa = PBXGroup;
+			children = (
+				F92E89F126C297BA00CFD6D4 /* AppDelegate.h */,
+				F92E89F226C297BA00CFD6D4 /* AppDelegate.m */,
+				F92E89FE26C297BA00CFD6D4 /* ViewController.h */,
+				F92E89FF26C297BA00CFD6D4 /* ViewController.m */,
+				F92E8A0126C297BA00CFD6D4 /* Main.storyboard */,
+				F92E8A0426C297BB00CFD6D4 /* Assets.xcassets */,
+				F92E8A0626C297BB00CFD6D4 /* main.m */,
+				F92E8A0826C297BB00CFD6D4 /* Redwax SignText.entitlements */,
+				F92E89F426C297BA00CFD6D4 /* Resources */,
+			);
+			path = "Redwax SignText";
+			sourceTree = "<group>";
+		};
+		F92E89F426C297BA00CFD6D4 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				F92E89F526C297BA00CFD6D4 /* Main.html */,
+				F92E89F826C297BA00CFD6D4 /* Icon.png */,
+				F92E89FA26C297BA00CFD6D4 /* Style.css */,
+				F92E89FC26C297BA00CFD6D4 /* Script.js */,
+			);
+			path = Resources;
+			sourceTree = "<group>";
+		};
+		F92E8A1026C297BC00CFD6D4 /* Redwax SignTextTests */ = {
+			isa = PBXGroup;
+			children = (
+				F92E8A1126C297BC00CFD6D4 /* Redwax_SignTextTests.m */,
+			);
+			path = "Redwax SignTextTests";
+			sourceTree = "<group>";
+		};
+		F92E8A1A26C297BC00CFD6D4 /* Redwax SignTextUITests */ = {
+			isa = PBXGroup;
+			children = (
+				F92E8A1B26C297BC00CFD6D4 /* Redwax_SignTextUITests.m */,
+			);
+			path = "Redwax SignTextUITests";
+			sourceTree = "<group>";
+		};
+		F92E8A2526C297BC00CFD6D4 /* Redwax SignText Extension */ = {
+			isa = PBXGroup;
+			children = (
+				F92E8A2626C297BC00CFD6D4 /* SafariWebExtensionHandler.h */,
+				F92E8A2726C297BC00CFD6D4 /* SafariWebExtensionHandler.m */,
+				F9E7326D26EBFCB700EFCD90 /* SignText.storyboard */,
+				F92E8A3A26C297BC00CFD6D4 /* Info.plist */,
+				F92E8A2926C297BC00CFD6D4 /* Resources */,
+			);
+			path = "Redwax SignText Extension";
+			sourceTree = "<group>";
+		};
+		F92E8A2926C297BC00CFD6D4 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				F92E8A2A26C297BC00CFD6D4 /* _locales */,
+				F92E8A2C26C297BC00CFD6D4 /* images */,
+				F92E8A2E26C297BC00CFD6D4 /* manifest.json */,
+				F92E8A3026C297BC00CFD6D4 /* background.js */,
+				F92E8A3226C297BC00CFD6D4 /* content.js */,
+				F92E8A3426C297BC00CFD6D4 /* popup.html */,
+				F92E8A3626C297BC00CFD6D4 /* popup.css */,
+				F92E8A3826C297BC00CFD6D4 /* popup.js */,
+				F9EC6F9A26EFD285004DEC36 /* signtext.js */,
+			);
+			path = Resources;
+			sourceTree = "<group>";
+		};
+		F9F7AE8626E8DBDE00524705 /* Redwax SignText Firefox Extension */ = {
+			isa = PBXGroup;
+			children = (
+				F9F7AE8B26E8E72600524705 /* Resources */,
+			);
+			path = "Redwax SignText Firefox Extension";
+			sourceTree = "<group>";
+		};
+		F9F7AE8B26E8E72600524705 /* Resources */ = {
+			isa = PBXGroup;
+			children = (
+				F9F7AE8C26E8EAF000524705 /* _locales */,
+				F9F7AE8D26E8EAF000524705 /* background.js */,
+				F9F7AE8826E8E66B00524705 /* content.js */,
+				F9F7AE8726E8E66B00524705 /* manifest.json */,
+			);
+			path = Resources;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		F92E89ED26C297BA00CFD6D4 /* Redwax SignText */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = F92E8A4126C297BC00CFD6D4 /* Build configuration list for PBXNativeTarget "Redwax SignText" */;
+			buildPhases = (
+				F92E89EA26C297BA00CFD6D4 /* Sources */,
+				F92E89EB26C297BA00CFD6D4 /* Frameworks */,
+				F92E89EC26C297BA00CFD6D4 /* Resources */,
+				F92E8A4026C297BC00CFD6D4 /* Embed App Extensions */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				F92E8A2426C297BC00CFD6D4 /* PBXTargetDependency */,
+			);
+			name = "Redwax SignText";
+			productName = "Redwax SignText";
+			productReference = F92E89EE26C297BA00CFD6D4 /* Redwax SignText.app */;
+			productType = "com.apple.product-type.application";
+		};
+		F92E8A0C26C297BC00CFD6D4 /* Redwax SignTextTests */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = F92E8A4426C297BC00CFD6D4 /* Build configuration list for PBXNativeTarget "Redwax SignTextTests" */;
+			buildPhases = (
+				F92E8A0926C297BC00CFD6D4 /* Sources */,
+				F92E8A0A26C297BC00CFD6D4 /* Frameworks */,
+				F92E8A0B26C297BC00CFD6D4 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				F92E8A0F26C297BC00CFD6D4 /* PBXTargetDependency */,
+			);
+			name = "Redwax SignTextTests";
+			productName = "Redwax SignTextTests";
+			productReference = F92E8A0D26C297BC00CFD6D4 /* Redwax SignTextTests.xctest */;
+			productType = "com.apple.product-type.bundle.unit-test";
+		};
+		F92E8A1626C297BC00CFD6D4 /* Redwax SignTextUITests */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = F92E8A4726C297BC00CFD6D4 /* Build configuration list for PBXNativeTarget "Redwax SignTextUITests" */;
+			buildPhases = (
+				F92E8A1326C297BC00CFD6D4 /* Sources */,
+				F92E8A1426C297BC00CFD6D4 /* Frameworks */,
+				F92E8A1526C297BC00CFD6D4 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				F92E8A1926C297BC00CFD6D4 /* PBXTargetDependency */,
+			);
+			name = "Redwax SignTextUITests";
+			productName = "Redwax SignTextUITests";
+			productReference = F92E8A1726C297BC00CFD6D4 /* Redwax SignTextUITests.xctest */;
+			productType = "com.apple.product-type.bundle.ui-testing";
+		};
+		F92E8A2026C297BC00CFD6D4 /* Redwax SignText Extension */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = F92E8A3D26C297BC00CFD6D4 /* Build configuration list for PBXNativeTarget "Redwax SignText Extension" */;
+			buildPhases = (
+				F92E8A1D26C297BC00CFD6D4 /* Sources */,
+				F92E8A1E26C297BC00CFD6D4 /* Frameworks */,
+				F92E8A1F26C297BC00CFD6D4 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = "Redwax SignText Extension";
+			productName = "Redwax SignText Extension";
+			productReference = F92E8A2126C297BC00CFD6D4 /* Redwax SignText Extension.appex */;
+			productType = "com.apple.product-type.app-extension";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		F92E89E626C297BA00CFD6D4 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				BuildIndependentTargetsInParallel = 1;
+				LastUpgradeCheck = 1300;
+				TargetAttributes = {
+					F92E89ED26C297BA00CFD6D4 = {
+						CreatedOnToolsVersion = 13.0;
+					};
+					F92E8A0C26C297BC00CFD6D4 = {
+						CreatedOnToolsVersion = 13.0;
+						TestTargetID = F92E89ED26C297BA00CFD6D4;
+					};
+					F92E8A1626C297BC00CFD6D4 = {
+						CreatedOnToolsVersion = 13.0;
+						TestTargetID = F92E89ED26C297BA00CFD6D4;
+					};
+					F92E8A2026C297BC00CFD6D4 = {
+						CreatedOnToolsVersion = 13.0;
+					};
+				};
+			};
+			buildConfigurationList = F92E89E926C297BA00CFD6D4 /* Build configuration list for PBXProject "Redwax SignText" */;
+			compatibilityVersion = "Xcode 13.0";
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = F92E89E526C297BA00CFD6D4;
+			productRefGroup = F92E89EF26C297BA00CFD6D4 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				F92E89ED26C297BA00CFD6D4 /* Redwax SignText */,
+				F92E8A0C26C297BC00CFD6D4 /* Redwax SignTextTests */,
+				F92E8A1626C297BC00CFD6D4 /* Redwax SignTextUITests */,
+				F92E8A2026C297BC00CFD6D4 /* Redwax SignText Extension */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		F92E89EC26C297BA00CFD6D4 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F92E89F926C297BA00CFD6D4 /* Icon.png in Resources */,
+				F92E8A0326C297BA00CFD6D4 /* Main.storyboard in Resources */,
+				F92E89FD26C297BA00CFD6D4 /* Script.js in Resources */,
+				F92E89F726C297BA00CFD6D4 /* Main.html in Resources */,
+				F92E8A0526C297BB00CFD6D4 /* Assets.xcassets in Resources */,
+				F92E89FB26C297BA00CFD6D4 /* Style.css in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F92E8A0B26C297BC00CFD6D4 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F92E8A1526C297BC00CFD6D4 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F92E8A1F26C297BC00CFD6D4 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F9EC6F9B26EFD285004DEC36 /* signtext.js in Resources */,
+				F92E8A3126C297BC00CFD6D4 /* background.js in Resources */,
+				F92E8A3726C297BC00CFD6D4 /* popup.css in Resources */,
+				F92E8A3526C297BC00CFD6D4 /* popup.html in Resources */,
+				F92E8A2D26C297BC00CFD6D4 /* images in Resources */,
+				F92E8A2F26C297BC00CFD6D4 /* manifest.json in Resources */,
+				F9E7326E26EBFCB700EFCD90 /* SignText.storyboard in Resources */,
+				F92E8A2B26C297BC00CFD6D4 /* _locales in Resources */,
+				F92E8A3326C297BC00CFD6D4 /* content.js in Resources */,
+				F92E8A3926C297BC00CFD6D4 /* popup.js in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		F92E89EA26C297BA00CFD6D4 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F92E8A0026C297BA00CFD6D4 /* ViewController.m in Sources */,
+				F92E8A0726C297BB00CFD6D4 /* main.m in Sources */,
+				F92E89F326C297BA00CFD6D4 /* AppDelegate.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F92E8A0926C297BC00CFD6D4 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F92E8A1226C297BC00CFD6D4 /* Redwax_SignTextTests.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F92E8A1326C297BC00CFD6D4 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F92E8A1C26C297BC00CFD6D4 /* Redwax_SignTextUITests.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F92E8A1D26C297BC00CFD6D4 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F92E8A2826C297BC00CFD6D4 /* SafariWebExtensionHandler.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		F92E8A0F26C297BC00CFD6D4 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = F92E89ED26C297BA00CFD6D4 /* Redwax SignText */;
+			targetProxy = F92E8A0E26C297BC00CFD6D4 /* PBXContainerItemProxy */;
+		};
+		F92E8A1926C297BC00CFD6D4 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = F92E89ED26C297BA00CFD6D4 /* Redwax SignText */;
+			targetProxy = F92E8A1826C297BC00CFD6D4 /* PBXContainerItemProxy */;
+		};
+		F92E8A2426C297BC00CFD6D4 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = F92E8A2026C297BC00CFD6D4 /* Redwax SignText Extension */;
+			targetProxy = F92E8A2326C297BC00CFD6D4 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+		F92E89F526C297BA00CFD6D4 /* Main.html */ = {
+			isa = PBXVariantGroup;
+			children = (
+				F92E89F626C297BA00CFD6D4 /* Base */,
+			);
+			name = Main.html;
+			sourceTree = "<group>";
+		};
+		F92E8A0126C297BA00CFD6D4 /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				F92E8A0226C297BA00CFD6D4 /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		F92E8A3B26C297BC00CFD6D4 /* 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++17";
+				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 = 11.5;
+				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+				MTL_FAST_MATH = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = macosx;
+			};
+			name = Debug;
+		};
+		F92E8A3C26C297BC00CFD6D4 /* 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++17";
+				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 = 11.5;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				MTL_FAST_MATH = YES;
+				SDKROOT = macosx;
+			};
+			name = Release;
+		};
+		F92E8A3E26C297BC00CFD6D4 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CODE_SIGN_STYLE = Automatic;
+				CURRENT_PROJECT_VERSION = 1;
+				DEVELOPMENT_TEAM = 3FFL5588QM;
+				ENABLE_APP_SANDBOX = YES;
+				ENABLE_HARDENED_RUNTIME = YES;
+				ENABLE_USER_SELECTED_FILES = readonly;
+				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_FILE = "Redwax SignText Extension/Info.plist";
+				INFOPLIST_KEY_CFBundleDisplayName = "Redwax SignText 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 = "eu.redwax.rst.macos.Redwax-SignText.Extension";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				SWIFT_EMIT_LOC_STRINGS = YES;
+			};
+			name = Debug;
+		};
+		F92E8A3F26C297BC00CFD6D4 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CODE_SIGN_STYLE = Automatic;
+				CURRENT_PROJECT_VERSION = 1;
+				DEVELOPMENT_TEAM = 3FFL5588QM;
+				ENABLE_APP_SANDBOX = YES;
+				ENABLE_HARDENED_RUNTIME = YES;
+				ENABLE_USER_SELECTED_FILES = readonly;
+				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_FILE = "Redwax SignText Extension/Info.plist";
+				INFOPLIST_KEY_CFBundleDisplayName = "Redwax SignText 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 = "eu.redwax.rst.macos.Redwax-SignText.Extension";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				SWIFT_EMIT_LOC_STRINGS = YES;
+			};
+			name = Release;
+		};
+		F92E8A4226C297BC00CFD6D4 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+				CODE_SIGN_ENTITLEMENTS = "Redwax SignText/Redwax SignText.entitlements";
+				CODE_SIGN_STYLE = Automatic;
+				COMBINE_HIDPI_IMAGES = YES;
+				CURRENT_PROJECT_VERSION = 1;
+				DEVELOPMENT_TEAM = 3FFL5588QM;
+				ENABLE_APP_SANDBOX = YES;
+				ENABLE_HARDENED_RUNTIME = YES;
+				ENABLE_USER_SELECTED_FILES = readonly;
+				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_KEY_CFBundleDisplayName = "Redwax SignText";
+				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 = "eu.redwax.rst.macos.Redwax-SignText";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_EMIT_LOC_STRINGS = YES;
+			};
+			name = Debug;
+		};
+		F92E8A4326C297BC00CFD6D4 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
+				CODE_SIGN_ENTITLEMENTS = "Redwax SignText/Redwax SignText.entitlements";
+				CODE_SIGN_STYLE = Automatic;
+				COMBINE_HIDPI_IMAGES = YES;
+				CURRENT_PROJECT_VERSION = 1;
+				DEVELOPMENT_TEAM = 3FFL5588QM;
+				ENABLE_APP_SANDBOX = YES;
+				ENABLE_HARDENED_RUNTIME = YES;
+				ENABLE_USER_SELECTED_FILES = readonly;
+				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_KEY_CFBundleDisplayName = "Redwax SignText";
+				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 = "eu.redwax.rst.macos.Redwax-SignText";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_EMIT_LOC_STRINGS = YES;
+			};
+			name = Release;
+		};
+		F92E8A4526C297BC00CFD6D4 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				BUNDLE_LOADER = "$(TEST_HOST)";
+				CODE_SIGN_STYLE = Automatic;
+				COMBINE_HIDPI_IMAGES = YES;
+				CURRENT_PROJECT_VERSION = 1;
+				DEVELOPMENT_TEAM = 3FFL5588QM;
+				GENERATE_INFOPLIST_FILE = YES;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/../Frameworks",
+					"@loader_path/../Frameworks",
+				);
+				MACOSX_DEPLOYMENT_TARGET = 10.14;
+				MARKETING_VERSION = 1.0;
+				PRODUCT_BUNDLE_IDENTIFIER = "eu.redwax.rst.macos.Redwax-SignTextTests";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_EMIT_LOC_STRINGS = NO;
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Redwax SignText.app/Contents/MacOS/Redwax SignText";
+			};
+			name = Debug;
+		};
+		F92E8A4626C297BC00CFD6D4 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				BUNDLE_LOADER = "$(TEST_HOST)";
+				CODE_SIGN_STYLE = Automatic;
+				COMBINE_HIDPI_IMAGES = YES;
+				CURRENT_PROJECT_VERSION = 1;
+				DEVELOPMENT_TEAM = 3FFL5588QM;
+				GENERATE_INFOPLIST_FILE = YES;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/../Frameworks",
+					"@loader_path/../Frameworks",
+				);
+				MACOSX_DEPLOYMENT_TARGET = 10.14;
+				MARKETING_VERSION = 1.0;
+				PRODUCT_BUNDLE_IDENTIFIER = "eu.redwax.rst.macos.Redwax-SignTextTests";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_EMIT_LOC_STRINGS = NO;
+				TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Redwax SignText.app/Contents/MacOS/Redwax SignText";
+			};
+			name = Release;
+		};
+		F92E8A4826C297BC00CFD6D4 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CODE_SIGN_STYLE = Automatic;
+				COMBINE_HIDPI_IMAGES = YES;
+				CURRENT_PROJECT_VERSION = 1;
+				DEVELOPMENT_TEAM = 3FFL5588QM;
+				GENERATE_INFOPLIST_FILE = YES;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/../Frameworks",
+					"@loader_path/../Frameworks",
+				);
+				MARKETING_VERSION = 1.0;
+				PRODUCT_BUNDLE_IDENTIFIER = "eu.redwax.rst.macos.Redwax-SignTextUITests";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_EMIT_LOC_STRINGS = NO;
+				TEST_TARGET_NAME = "Redwax SignText";
+			};
+			name = Debug;
+		};
+		F92E8A4926C297BC00CFD6D4 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CODE_SIGN_STYLE = Automatic;
+				COMBINE_HIDPI_IMAGES = YES;
+				CURRENT_PROJECT_VERSION = 1;
+				DEVELOPMENT_TEAM = 3FFL5588QM;
+				GENERATE_INFOPLIST_FILE = YES;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/../Frameworks",
+					"@loader_path/../Frameworks",
+				);
+				MARKETING_VERSION = 1.0;
+				PRODUCT_BUNDLE_IDENTIFIER = "eu.redwax.rst.macos.Redwax-SignTextUITests";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SWIFT_EMIT_LOC_STRINGS = NO;
+				TEST_TARGET_NAME = "Redwax SignText";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		F92E89E926C297BA00CFD6D4 /* Build configuration list for PBXProject "Redwax SignText" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				F92E8A3B26C297BC00CFD6D4 /* Debug */,
+				F92E8A3C26C297BC00CFD6D4 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		F92E8A3D26C297BC00CFD6D4 /* Build configuration list for PBXNativeTarget "Redwax SignText Extension" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				F92E8A3E26C297BC00CFD6D4 /* Debug */,
+				F92E8A3F26C297BC00CFD6D4 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		F92E8A4126C297BC00CFD6D4 /* Build configuration list for PBXNativeTarget "Redwax SignText" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				F92E8A4226C297BC00CFD6D4 /* Debug */,
+				F92E8A4326C297BC00CFD6D4 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		F92E8A4426C297BC00CFD6D4 /* Build configuration list for PBXNativeTarget "Redwax SignTextTests" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				F92E8A4526C297BC00CFD6D4 /* Debug */,
+				F92E8A4626C297BC00CFD6D4 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		F92E8A4726C297BC00CFD6D4 /* Build configuration list for PBXNativeTarget "Redwax SignTextUITests" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				F92E8A4826C297BC00CFD6D4 /* Debug */,
+				F92E8A4926C297BC00CFD6D4 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = F92E89E626C297BA00CFD6D4 /* Project object */;
+}

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/contents.xcworkspacedata
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/contents.xcworkspacedata	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/contents.xcworkspacedata	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/xcuserdata/minfrin.xcuserdatad/UserInterfaceState.xcuserstate
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/project.xcworkspace/xcuserdata/minfrin.xcuserdatad/UserInterfaceState.xcuserstate
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+   uuid = "2419D0E2-0468-44FE-8AC7-BBF891233FD6"
+   type = "1"
+   version = "2.0">
+   <Breakpoints>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "560CDD18-194E-4FA5-BA41-C9C831CAA4D0"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Redwax SignText Extension/Resources/background.js"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "12"
+            endingLineNumber = "12"
+            landmarkName = "nativeMessaged"
+            landmarkType = "9">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "1E73F1D7-FBE3-443A-8308-11C122B11D3C"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Redwax SignText Extension/SafariWebExtensionHandler.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "92"
+            endingLineNumber = "92"
+            landmarkName = "-beginRequestWithExtensionContext:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "8B25500F-84EA-41E8-B777-5AF0DAC78D29"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "Redwax SignText Extension/Resources/background.js"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "28"
+            endingLineNumber = "28"
+            landmarkName = "connected"
+            landmarkType = "9">
+         </BreakpointContent>
+      </BreakpointProxy>
+   </Breakpoints>
+</Bucket>

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcschemes/xcschememanagement.plist
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcschemes/xcschememanagement.plist	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText.xcodeproj/xcuserdata/minfrin.xcuserdatad/xcschemes/xcschememanagement.plist	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>Redwax SignText.xcscheme_^#shared#^_</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>0</integer>
+		</dict>
+	</dict>
+</dict>
+</plist>

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/AppDelegate.h
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/AppDelegate.h	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/AppDelegate.h	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,12 @@
+//
+//  AppDelegate.h
+//  Redwax SignText
+//
+//  Created by Graham Leggett on 2021/08/10.
+//
+
+#import <Cocoa/Cocoa.h>
+
+ at interface AppDelegate : NSObject <NSApplicationDelegate>
+
+ at end

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/AppDelegate.m
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/AppDelegate.m	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/AppDelegate.m	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,20 @@
+//
+//  AppDelegate.m
+//  Redwax SignText
+//
+//  Created by Graham Leggett on 2021/08/10.
+//
+
+#import "AppDelegate.h"
+
+ at implementation AppDelegate
+
+- (void)applicationDidFinishLaunching:(NSNotification *)notification {
+    // Override point for customization after application launch.
+}
+
+- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {
+    return YES;
+}
+
+ at end

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/AccentColor.colorset/Contents.json
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/AccentColor.colorset/Contents.json
------------------------------------------------------------------------------
    svn:mime-type = application/json

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/AppIcon.appiconset/Contents.json
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/AppIcon.appiconset/Contents.json
------------------------------------------------------------------------------
    svn:mime-type = application/json

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/Contents.json
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/Contents.json
------------------------------------------------------------------------------
    svn:mime-type = application/json

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/LargeIcon.imageset/Contents.json
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Assets.xcassets/LargeIcon.imageset/Contents.json
------------------------------------------------------------------------------
    svn:mime-type = application/json

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Base.lproj/Main.html
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Base.lproj/Main.html	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Base.lproj/Main.html	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+    <meta http-equiv="Content-Security-Policy" content="default-src 'self'">
+
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+
+    <link rel="stylesheet" href="../Style.css">
+    <script src="../Script.js" defer></script>
+</head>
+<body>
+    <img src="../Icon.png" width="128" height="128" alt="Redwax SignText Icon">
+    <p class="state-unknown">You can turn on Redwax SignText’s extension in Safari Extensions preferences.</p>
+    <p class="state-on">Redwax SignText’s extension is currently on. You can turn it off in Safari Extensions preferences.</p>
+    <p class="state-off">Redwax SignText’s extension is currently off. You can turn it on in Safari Extensions preferences.</p>
+    <button class="open-preferences">Quit and Open Safari Extensions Preferences…</button>
+</body>
+</html>

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Base.lproj/Main.storyboard
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Base.lproj/Main.storyboard	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Base.lproj/Main.storyboard	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19085" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19085"/>
+        <plugIn identifier="com.apple.WebKit2IBPlugin" version="19085"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Application-->
+        <scene sceneID="JPo-4y-FX3">
+            <objects>
+                <application id="hnw-xV-0zn" sceneMemberID="viewController">
+                    <menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
+                        <items>
+                            <menuItem title="Redwax SignText" id="1Xt-HY-uBw">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <menu key="submenu" title="Redwax SignText" systemMenu="apple" id="uQy-DD-JDr">
+                                    <items>
+                                        <menuItem title="About Redwax SignText" id="5kV-Vb-QxS">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
+                                        <menuItem title="Hide Redwax SignText" keyEquivalent="h" id="Olw-nP-bQN">
+                                            <connections>
+                                                <action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
+                                            <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
+                                            <connections>
+                                                <action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem title="Show All" id="Kd2-mp-pUS">
+                                            <modifierMask key="keyEquivalentModifierMask"/>
+                                            <connections>
+                                                <action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
+                                            </connections>
+                                        </menuItem>
+                                        <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
+                                        <menuItem title="Quit Redwax SignText" keyEquivalent="q" id="4sb-4s-VLi">
+                                            <connections>
+                                                <action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                            <menuItem title="Help" id="wpr-3q-Mcd">
+                                <modifierMask key="keyEquivalentModifierMask"/>
+                                <menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
+                                    <items>
+                                        <menuItem title="Redwax SignText Help" keyEquivalent="?" id="FKE-Sm-Kum">
+                                            <connections>
+                                                <action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
+                                            </connections>
+                                        </menuItem>
+                                    </items>
+                                </menu>
+                            </menuItem>
+                        </items>
+                    </menu>
+                    <connections>
+                        <outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
+                    </connections>
+                </application>
+                <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModuleProvider=""/>
+                <customObject id="YLy-65-1bz" customClass="NSFontManager"/>
+                <customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="76" y="-134"/>
+        </scene>
+        <!--Window Controller-->
+        <scene sceneID="R2V-B0-nI4">
+            <objects>
+                <windowController showSeguePresentationStyle="single" id="B8D-0N-5wS" sceneMemberID="viewController">
+                    <window key="window" title="Redwax SignText" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" releasedWhenClosed="NO" animationBehavior="default" id="IQv-IB-iLA">
+                        <windowStyleMask key="styleMask" titled="YES" closable="YES"/>
+                        <windowCollectionBehavior key="collectionBehavior" fullScreenNone="YES"/>
+                        <rect key="contentRect" x="196" y="240" width="425" height="325"/>
+                        <rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
+                        <connections>
+                            <outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
+                        </connections>
+                    </window>
+                    <connections>
+                        <segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
+                    </connections>
+                </windowController>
+                <customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="75" y="250"/>
+        </scene>
+        <!--View Controller-->
+        <scene sceneID="hIz-AP-VOD">
+            <objects>
+                <viewController id="XfG-lQ-9wD" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
+                    <view key="view" id="m2S-Jp-Qdl">
+                        <rect key="frame" x="0.0" y="0.0" width="425" height="325"/>
+                        <autoresizingMask key="autoresizingMask"/>
+                        <subviews>
+                            <wkWebView wantsLayer="YES" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="eOr-cG-IQY">
+                                <rect key="frame" x="0.0" y="0.0" width="425" height="325"/>
+                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                <wkWebViewConfiguration key="configuration">
+                                    <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
+                                    <wkPreferences key="preferences"/>
+                                </wkWebViewConfiguration>
+                            </wkWebView>
+                        </subviews>
+                    </view>
+                    <connections>
+                        <outlet property="webView" destination="eOr-cG-IQY" id="GFe-mU-dBY"/>
+                    </connections>
+                </viewController>
+                <customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="75" y="655"/>
+        </scene>
+    </scenes>
+</document>

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Redwax SignText.entitlements
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Redwax SignText.entitlements	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Redwax SignText.entitlements	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>com.apple.security.network.client</key>
+	<true/>
+</dict>
+</plist>

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Icon.png
==============================================================================
Binary file - no diff available.

Propchange: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Icon.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Script.js
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Script.js	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Script.js	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,15 @@
+function show(enabled) {
+    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);

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Style.css
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Style.css	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/Resources/Style.css	Wed Sep 22 11:14:40 2021
@@ -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;
+}

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/ViewController.h
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/ViewController.h	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/ViewController.h	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,12 @@
+//
+//  ViewController.h
+//  Redwax SignText
+//
+//  Created by Graham Leggett on 2021/08/10.
+//
+
+#import <Cocoa/Cocoa.h>
+
+ at interface ViewController : NSViewController
+
+ at end

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/ViewController.m
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/ViewController.m	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/ViewController.m	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,57 @@
+//
+//  ViewController.m
+//  Redwax SignText
+//
+//  Created by Graham Leggett on 2021/08/10.
+//
+
+#import "ViewController.h"
+
+#import <SafariServices/SafariServices.h>
+#import <WebKit/WebKit.h>
+
+static NSString * const extensionBundleIdentifier = @"eu.redwax.rst.macos.Redwax-SignText.Extension";
+
+ at interface ViewController () <WKNavigationDelegate, WKScriptMessageHandler>
+
+ at property (nonatomic) IBOutlet WKWebView *webView;
+
+ at end
+
+ at implementation ViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+
+    _webView.navigationDelegate = self;
+
+    [_webView.configuration.userContentController addScriptMessageHandler:self name:@"controller"];
+
+    [_webView loadFileURL:[NSBundle.mainBundle URLForResource:@"Main" withExtension:@"html"] allowingReadAccessToURL:NSBundle.mainBundle.resourceURL];
+}
+
+- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
+    [SFSafariExtensionManager getStateOfSafariExtensionWithIdentifier:extensionBundleIdentifier completionHandler:^(SFSafariExtensionState *state, NSError *error) {
+        dispatch_async(dispatch_get_main_queue(), ^{
+            if (!state) {
+                // Insert code to inform the user something went wrong.
+                return;
+            }
+
+            [webView evaluateJavaScript:[NSString stringWithFormat:@"show(%@)", state.isEnabled ? @"true" : @"false"] completionHandler:nil];
+        });
+    }];
+}
+
+- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
+    if (![message.body isEqualToString:@"open-preferences"])
+        return;
+
+    [SFSafariApplication showPreferencesForExtensionWithIdentifier:extensionBundleIdentifier completionHandler:^(NSError *error) {
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [NSApplication.sharedApplication terminate:nil];
+        });
+    }];
+}
+
+ at end

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/main.m
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/main.m	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignText/main.m	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,15 @@
+//
+//  main.m
+//  Redwax SignText
+//
+//  Created by Graham Leggett on 2021/08/10.
+//
+
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, const char * argv[]) {
+    @autoreleasepool {
+        // Setup code that might create autoreleased objects goes here.
+    }
+    return NSApplicationMain(argc, argv);
+}

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignTextTests/Redwax_SignTextTests.m
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignTextTests/Redwax_SignTextTests.m	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignTextTests/Redwax_SignTextTests.m	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,36 @@
+//
+//  Redwax_SignTextTests.m
+//  Redwax SignTextTests
+//
+//  Created by Graham Leggett on 2021/08/10.
+//
+
+#import <XCTest/XCTest.h>
+
+ at interface Redwax_SignTextTests : XCTestCase
+
+ at end
+
+ at implementation Redwax_SignTextTests
+
+- (void)setUp {
+    // Put setup code here. This method is called before the invocation of each test method in the class.
+}
+
+- (void)tearDown {
+    // Put teardown code here. This method is called after the invocation of each test method in the class.
+}
+
+- (void)testExample {
+    // This is an example of a functional test case.
+    // Use XCTAssert and related functions to verify your tests produce the correct results.
+}
+
+- (void)testPerformanceExample {
+    // This is an example of a performance test case.
+    [self measureBlock:^{
+        // Put the code you want to measure the time of here.
+    }];
+}
+
+ at end

Added: redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignTextUITests/Redwax_SignTextUITests.m
==============================================================================
--- redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignTextUITests/Redwax_SignTextUITests.m	(added)
+++ redwax-signtext/trunk/src/macos/Redwax SignText/Redwax SignTextUITests/Redwax_SignTextUITests.m	Wed Sep 22 11:14:40 2021
@@ -0,0 +1,47 @@
+//
+//  Redwax_SignTextUITests.m
+//  Redwax SignTextUITests
+//
+//  Created by Graham Leggett on 2021/08/10.
+//
+
+#import <XCTest/XCTest.h>
+
+ at interface Redwax_SignTextUITests : XCTestCase
+
+ at end
+
+ at implementation Redwax_SignTextUITests
+
+- (void)setUp {
+    // 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.
+    self.continueAfterFailure = NO;
+
+    // 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.
+}
+
+- (void)tearDown {
+    // Put teardown code here. This method is called after the invocation of each test method in the class.
+}
+
+- (void)testExample {
+    // UI tests must launch the application that they test.
+    XCUIApplication *app = [[XCUIApplication alloc] init];
+    [app launch];
+
+    // Use recording to get started writing UI tests.
+    // Use XCTAssert and related functions to verify your tests produce the correct results.
+}
+
+- (void)testLaunchPerformance {
+    if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *)) {
+        // This measures how long it takes to launch your application.
+        [self measureWithMetrics:@[[[XCTApplicationLaunchMetric alloc] init]] block:^{
+            [[[XCUIApplication alloc] init] launch];
+        }];
+    }
+}
+
+ at end



More information about the rs-commit mailing list