Skip to content

Commit

Permalink
Merge pull request #727 from persepolisdm/ENHANCEMENT-Add-support-for…
Browse files Browse the repository at this point in the history
…-Brave-browser

+ Add support for Brave Browser
  • Loading branch information
alireza-amirsamimi authored Oct 19, 2019
2 parents 99783af + 95997f8 commit 2bbf712
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
5 changes: 3 additions & 2 deletions persepolis/constants/Browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ class BROWSER:
OPERA = 'opera'
VIVALDI = 'vivaldi'
FIREFOX = 'firefox'
CHROME_FAMILY = [CHROME, CHROMIUM, VIVALDI, OPERA]
LIST = [CHROME, CHROMIUM, OPERA, VIVALDI, FIREFOX]
BRAVE = 'brave'
CHROME_FAMILY = [CHROME, CHROMIUM, VIVALDI, OPERA, BRAVE]
LIST = [CHROME, CHROMIUM, OPERA, VIVALDI, FIREFOX, BRAVE]
13 changes: 13 additions & 0 deletions persepolis/scripts/browser_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def browserIntegration(browser):
native_message_folder = home_address + \
'/.config/opera/NativeMessagingHosts'

elif browser == BROWSER.BRAVE:
native_message_folder = home_address + \
'/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts'

# for FreeBSD and OpenBSD
elif os_type in OS.BSD_FAMILY:
# find Persepolis execution path
Expand All @@ -83,6 +87,11 @@ def browserIntegration(browser):
native_message_folder = home_address + \
'/.config/opera/NativeMessagingHosts'

elif browser == BROWSER.BRAVE:
native_message_folder = home_address + \
'/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts'


# for Mac OSX
elif os_type == OS.OSX:
# find Persepolis execution path
Expand Down Expand Up @@ -110,6 +119,10 @@ def browserIntegration(browser):
native_message_folder = home_address + \
'/Library/Application Support/Opera/NativeMessagingHosts/'

elif browser == BROWSER.BRAVE:
native_message_folder = home_address + \
'/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/'

# for MicroSoft Windows os (windows 7 , ...)
elif os_type == OS.WINDOWS:
# finding Persepolis execution path
Expand Down
1 change: 0 additions & 1 deletion persepolis/scripts/initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@
for folder in folder_list:
osCommands.makeDirs(folder)


persepolis_setting.endGroup()

# Browser integration for Firefox and chromium and google chrome
Expand Down

0 comments on commit 2bbf712

Please sign in to comment.