Skip to content

Commit

Permalink
Merge pull request #54 from erikeah/master
Browse files Browse the repository at this point in the history
Added support for LibreWolf Browser
  • Loading branch information
tuxor1337 authored Nov 3, 2021
2 parents a7ecc05 + 6f678f9 commit 22267a0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/install_host_app.bat
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ IF NOT "%1"=="" (
) ELSE IF "%1"=="firefox" (
SET "TARGET_REG=HKCU\SOFTWARE\Mozilla\NativeMessagingHosts\%APP_NAME%"
SHIFT
) ELSE IF "%1"=="librewolf" (
SET "TARGET_REG=HKCU\SOFTWARE\LibreWolf\NativeMessagingHosts\%APP_NAME%"
SHIFT
) ELSE IF "%1"=="chrome" (
SET "TARGET_REG=HKCU\Software\Google\Chrome\NativeMessagingHosts\%APP_NAME%"
SHIFT
Expand Down Expand Up @@ -101,7 +104,7 @@ REG ADD "%TARGET_REG%" /ve /d "%HOST_MANIFEST_FULL%" /f || (
EXIT /B

:help
ECHO Usage: %0 [OPTION] [chrome^|chromium^|firefox^|opera^|vivaldi]
ECHO Usage: %0 [OPTION] [chrome^|chromium^|firefox^|opera^|vivaldi^|librewolf]
ECHO
ECHO Options:
ECHO --local Install files from disk instead of downloading them
Expand Down
10 changes: 9 additions & 1 deletion src/install_host_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,32 @@ if [ "$KERNEL_NAME" = 'Darwin' ]; then
TARGET_DIR_CHROMIUM="/Library/Application Support/Chromium/NativeMessagingHosts"
TARGET_DIR_FIREFOX="/Library/Application Support/Mozilla/NativeMessagingHosts"
TARGET_DIR_VIVALDI="/Library/Application Support/Vivaldi/NativeMessagingHosts"
TARGET_DIR_LIBREWOLF="/Library/Application Support/LibreWolf/NativeMessagingHosts"
else
TARGET_DIR_CHROME="$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts"
TARGET_DIR_CHROMIUM="$HOME/Library/Application Support/Chromium/NativeMessagingHosts"
TARGET_DIR_FIREFOX="$HOME/Library/Application Support/Mozilla/NativeMessagingHosts"
TARGET_DIR_VIVALDI="$HOME/Library/Application Support/Vivaldi/NativeMessagingHosts"
TARGET_DIR_LIBREWOLF="$HOME/Library/Application Support/LibreWolf/NativeMessagingHosts"
fi
else
if [ "$(whoami)" = "root" ]; then
TARGET_DIR_CHROME="/etc/opt/chrome/native-messaging-hosts"
TARGET_DIR_CHROMIUM="/etc/chromium/native-messaging-hosts"
TARGET_DIR_FIREFOX="/usr/lib/mozilla/native-messaging-hosts"
TARGET_DIR_VIVALDI="/etc/vivaldi/native-messaging-hosts"
TARGET_DIR_LIBREWOLF="/usr/lib/librewolf/native-messaging-hosts"
else
TARGET_DIR_CHROME="$HOME/.config/google-chrome/NativeMessagingHosts"
TARGET_DIR_CHROMIUM="$HOME/.config/chromium/NativeMessagingHosts"
TARGET_DIR_FIREFOX="$HOME/.mozilla/native-messaging-hosts"
TARGET_DIR_VIVALDI="$HOME/.config/vivaldi/NativeMessagingHosts"
TARGET_DIR_LIBREWOLF="$HOME/.librewolf/native-messaging-hosts"
fi
fi

usage() {
echo "Usage: $0 [OPTION] [chrome|chromium|firefox|opera|vivaldi]
echo "Usage: $0 [OPTION] [chrome|chromium|firefox|opera|vivaldi|librewolf]
Example:
$0 firefox # Install host app for Mozilla Firefox
Expand All @@ -65,6 +69,10 @@ while [ $# -gt 0 ]; do
BROWSER_NAME="Firefox"
TARGET_DIR="$TARGET_DIR_FIREFOX"
;;
librewolf)
BROWSER_NAME="Librewolf"
TARGET_DIR="$TARGET_DIR_LIBREWOLF"
;;
opera)
BROWSER_NAME="Opera"
TARGET_DIR="$TARGET_DIR_VIVALDI"
Expand Down

0 comments on commit 22267a0

Please sign in to comment.