diff --git a/webextension/native/open_with_linux.py b/webextension/native/open_with_linux.py index fe1dbec..0145d2c 100755 --- a/webextension/native/open_with_linux.py +++ b/webextension/native/open_with_linux.py @@ -62,9 +62,11 @@ def install(): 'type': 'stdio', } locations = { + 'brave': os.path.join(home_path, '.config', 'BraveSoftware', 'Brave-Browser-Dev', 'NativeMessagingHosts'), 'chrome': os.path.join(home_path, '.config', 'google-chrome', 'NativeMessagingHosts'), 'chromium': os.path.join(home_path, '.config', 'chromium', 'NativeMessagingHosts'), 'firefox': os.path.join(home_path, '.mozilla', 'native-messaging-hosts'), + 'waterfox-current': os.path.join(home_path, '.waterfox', 'native-messaging-hosts'), } filename = 'open_with.json' @@ -74,7 +76,7 @@ def install(): os.mkdir(location) browser_manifest = manifest.copy() - if browser == 'firefox': + if browser == 'firefox' or browser == 'waterfox-current': browser_manifest['allowed_extensions'] = ['openwith@darktrojan.net'] else: browser_manifest['allowed_origins'] = [ @@ -112,6 +114,9 @@ def _read_desktop_file(path): def find_browsers(): apps = [ + 'brave', + 'brave-browser', + 'brave-browser-dev', 'Chrome', 'Chromium', 'chromium-browser', @@ -123,6 +128,8 @@ def find_browsers(): 'Opera', 'SeaMonkey', 'seamonkey', + 'Waterfox Current', + 'waterfox-current', ] paths = [ os.path.join(os.getenv('HOME'), '.local/share/applications'), diff --git a/webextension/native/open_with_mac.py b/webextension/native/open_with_mac.py index 075d985..4c4ca72 100755 --- a/webextension/native/open_with_mac.py +++ b/webextension/native/open_with_mac.py @@ -62,9 +62,11 @@ def install(): 'type': 'stdio', } locations = { + 'brave': os.path.join(home_path, 'Library', 'Application Support', 'BraveSoftware', 'Brave-Browser-Dev', 'NativeMessagingHosts'), 'chrome': os.path.join(home_path, 'Library', 'Application Support', 'Google', 'Chrome', 'NativeMessagingHosts'), 'chromium': os.path.join(home_path, 'Library', 'Application Support', 'Chromium', 'NativeMessagingHosts'), 'firefox': os.path.join(home_path, 'Library', 'Application Support', 'Mozilla', 'NativeMessagingHosts'), + 'waterfox-current': os.path.join(home_path, 'Library', 'Application Support', 'Waterfox', 'NativeMessagingHosts'), } filename = 'open_with.json' @@ -74,7 +76,7 @@ def install(): os.mkdir(location) browser_manifest = manifest.copy() - if browser == 'firefox': + if browser == 'firefox' or browser == 'waterfox-current': browser_manifest['allowed_extensions'] = ['openwith@darktrojan.net'] else: browser_manifest['allowed_origins'] = [ @@ -90,6 +92,7 @@ def install(): def find_browsers(): apps = [ + 'Brave', 'Chrome', 'Chromium', 'Firefox', @@ -97,6 +100,7 @@ def find_browsers(): 'Opera', 'Safari', 'SeaMonkey', + 'Waterfox Current', ] paths = [ os.path.join(os.getenv('HOME'), 'Applications'), diff --git a/webextension/native/open_with_windows.py b/webextension/native/open_with_windows.py index 8f56cac..daed922 100644 --- a/webextension/native/open_with_windows.py +++ b/webextension/native/open_with_windows.py @@ -73,13 +73,15 @@ def install(): file.write('@echo off\r\ncall "%s" "%s" %%1 %%2\r\n' % (sys.executable, this_file)) registry_locations = { + 'brave': os.path.join('Software', 'BraveSoftware', 'Brave-Browser-Dev', 'NativeMessagingHosts'), 'chrome': os.path.join('Software', 'Google', 'Chrome', 'NativeMessagingHosts'), 'firefox': os.path.join('Software', 'Mozilla', 'NativeMessagingHosts'), + 'waterfox-current': os.path.join('Software', 'Waterfox', 'Waterfox Current 68.0', 'NativeMessagingHosts'), } for browser, registry_location in registry_locations.items(): browser_manifest = manifest.copy() - if browser == 'firefox': + if browser == 'firefox' or browser == 'waterfox-current': browser_manifest['allowed_extensions'] = ['openwith@darktrojan.net'] else: browser_manifest['allowed_origins'] = [