From: Chris Sharp Date: Fri, 27 Apr 2018 19:49:39 +0000 (-0400) Subject: LP#1731922 - Firefox Add-on for Hatch X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e413b2b2e1bab0fe25ceade21d2b370dc874abae;p=working%2FHatch.git LP#1731922 - Firefox Add-on for Hatch - 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 --- diff --git a/INSTALL.adoc b/INSTALL.adoc index 7982b3a16e..0ae2ad792c 100644 --- a/INSTALL.adoc +++ b/INSTALL.adoc @@ -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 index 0000000000..8cf84211f2 --- /dev/null +++ b/extension/host/chrome/org.evergreen_ils.hatch.json @@ -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 index 8cf84211f2..0000000000 --- a/extension/host/org.evergreen_ils.hatch.json +++ /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/" - ] -}