LP#1731922 - Firefox Add-on for Hatch
authorChris Sharp <csharp@georgialibraries.org>
Fri, 27 Apr 2018 19:49:39 +0000 (15:49 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Fri, 27 Apr 2018 19:49:39 +0000 (15:49 -0400)
- move the Chrom(e|ium) native manifest to a "chrome" directory
- create a Firefox version of the native manifest in a "firefox" directory
- update the documentation to include Firefox instructions

Because the add-on has not been packaged or published, the native manifest will
need to be edited once that's done.

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
INSTALL.adoc
extension/host/chrome/org.evergreen_ils.hatch.json [new file with mode: 0644]
extension/host/org.evergreen_ils.hatch.json [deleted file]

index 7982b3a..0ae2ad7 100644 (file)
@@ -33,6 +33,10 @@ C:\Program Files (x86)\Hatch>hatch.sh test
 If the extension was not installed automatically when installing Hatch you can get it directly in the browser from the
 https://chrome.google.com/webstore/detail/hatch-native-messenger/ppooibdipmklfichpmkcgplfgdplgahl[Chrome App Store]
 
+=== Install Firefox Add-on ===
+If the add-on was not installed automatically when installing Hatch you can get it directly in the browser from the
+Firefox Add-on site.
+
 === Continue with xref:using-hatch[Using Hatch] ===
 
 
@@ -62,14 +66,14 @@ Edit extension/host/org.evergreen_ils.hatch.json and change the "path"
 value to match the location of your copy of "hatch.sh", found in the root
 directory of the Hatch repository.
 
-Copy the host file into Chrome's configuration directory.
+Copy the host file into your browser's configuration directory.
 
 For Chrome:
 
 [source,sh]
 -------------------------------------------------------------------------
 $ mkdir -p ~/.config/google-chrome/NativeMessagingHosts/
-$ cp extension/host/org.evergreen_ils.hatch.json ~/.config/google-chrome/NativeMessagingHosts/
+$ cp extension/host/chrome/org.evergreen_ils.hatch.json ~/.config/google-chrome/NativeMessagingHosts/
 -------------------------------------------------------------------------
 
 For Chromium:
@@ -77,14 +81,25 @@ For Chromium:
 [source,sh]
 -------------------------------------------------------------------------
 $ mkdir -p ~/.config/chromium/NativeMessagingHosts/
-$ cp extension/host/org.evergreen_ils.hatch.json ~/.config/chromium/NativeMessagingHosts/
+$ cp extension/host/chrome/org.evergreen_ils.hatch.json ~/.config/chromium/NativeMessagingHosts/
+-------------------------------------------------------------------------
+
+For Firefox:
+
+[source,sh]
+-------------------------------------------------------------------------
+$ mkdir -p ~/.mozilla/native-messaging-hosts/
+$ cp extension/host/firefox/org.evergreen_ils.hatch.json ~/.mozilla/native-messaging-hosts/
 -------------------------------------------------------------------------
 
+
 === Install Chrome Extension ===
 
 Install the exenstion directly in the browser from the
 https://chrome.google.com/webstore/detail/hatch-native-messenger/ppooibdipmklfichpmkcgplfgdplgahl[Chrome App Store]
 
+=== Install Firefox Add-on ===
+Install the extension directly in the browser from the Firefox Add-ons site.
 
 ==== Optional: Test Hatch ====
 
@@ -136,3 +151,17 @@ Hatch responded to message ID 1
    the exention manually via developer mode tools).
  * See also https://developer.chrome.com/extensions/getstarted
 
+
+=== Optional: Debugging The Firefox Add-on ===
+
+ * Navigate to about:addons
+ * Click on the gear dropdown and select "Debug Add-ons". 
+ * Click the "Debug" link to see the exension console.
+ * When the extension is loaded (or reloaded), it should show
+   "Connecting to native messaging host: org.evergreen_ils.hatch"
+   in the Background Page console with no errors.
+ * Use the "Reload" link to apply local changes made to the
+   extension (e.g. main.js).  (This might only work when installing
+   the exention manually via developer mode tools). 
+ * See also https://developer.mozilla.org/en-US/Add-ons
+
diff --git a/extension/host/chrome/org.evergreen_ils.hatch.json b/extension/host/chrome/org.evergreen_ils.hatch.json
new file mode 100644 (file)
index 0000000..8cf8421
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "name": "org.evergreen_ils.hatch",
+  "description": "Hatch Native Messaging Host",
+  "path": "/path/to/hatch.sh",
+  "type": "stdio",
+  "allowed_origins": [
+    "chrome-extension://ppooibdipmklfichpmkcgplfgdplgahl/"
+  ]
+}
diff --git a/extension/host/org.evergreen_ils.hatch.json b/extension/host/org.evergreen_ils.hatch.json
deleted file mode 100644 (file)
index 8cf8421..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "name": "org.evergreen_ils.hatch",
-  "description": "Hatch Native Messaging Host",
-  "path": "/path/to/hatch.sh",
-  "type": "stdio",
-  "allowed_origins": [
-    "chrome-extension://ppooibdipmklfichpmkcgplfgdplgahl/"
-  ]
-}