From 3bc1d8791bb8ed7b95afcd1cef2a5972ef485b73 Mon Sep 17 00:00:00 2001 From: Chen Feldman Date: Sun, 18 Jul 2021 07:00:12 -0400 Subject: [PATCH 1/2] Adds Brave to browsers available for Windows --- win/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/win/__init__.py b/win/__init__.py index 3423651..94a4e2d 100644 --- a/win/__init__.py +++ b/win/__init__.py @@ -69,6 +69,12 @@ def ie(self): except WindowNotFoundError: pass + def brave(self): + try: + self.SendKeysToAllWindows('.*Brave') + except WindowNotFoundError: + pass + def SendKeysToAllWindows(self, title_regex): "Sends the keystroke to all windows whose title matches the regex" From 576ca84fe5d95ffa51361a29b81ef9527717e011 Mon Sep 17 00:00:00 2001 From: Chen Feldman Date: Sun, 18 Jul 2021 07:08:54 -0400 Subject: [PATCH 2/2] Adds Brave to browsers available on Linux --- BrowserRefresh.py | 3 +++ linux/__init__.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/BrowserRefresh.py b/BrowserRefresh.py index 9fee847..3c83dfc 100644 --- a/BrowserRefresh.py +++ b/BrowserRefresh.py @@ -79,3 +79,6 @@ def run(self, args, activate=True, if 'palemoon' in browsers and _os == 'Windows': refresher.palemoon() + + if 'brave' in browsers and _os == 'Windows': + refresher.brave() diff --git a/linux/__init__.py b/linux/__init__.py index eaf4908..340ee18 100644 --- a/linux/__init__.py +++ b/linux/__init__.py @@ -34,6 +34,9 @@ def ie(self): pass # except NotImplemented("IE support not implemented yet.") + def brave(self): + self.SendKeysToAllWindows('brave-browser', 'F5') + def SendKeysToAllWindows(self, cls, key): "Sends the keystroke to all windows whose title matches the regex"