From e413b2b2e1bab0fe25ceade21d2b370dc874abae Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Fri, 27 Apr 2018 15:49:39 -0400 Subject: [PATCH] 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 --- INSTALL.adoc | 35 ++++++++++++++++++++-- .../host/{ => chrome}/org.evergreen_ils.hatch.json | 0 2 files changed, 32 insertions(+), 3 deletions(-) rename extension/host/{ => chrome}/org.evergreen_ils.hatch.json (100%) 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/org.evergreen_ils.hatch.json b/extension/host/chrome/org.evergreen_ils.hatch.json similarity index 100% rename from extension/host/org.evergreen_ils.hatch.json rename to extension/host/chrome/org.evergreen_ils.hatch.json -- 2.11.0