Skip to content

Commit

Permalink
Fix running browser detection on Mavericks
Browse files Browse the repository at this point in the history
This fix will properly detect Safari and Webkit
unde Mac OS X 10.9 Mavericks
  • Loading branch information
Giovanni Collazo committed Nov 27, 2013
1 parent 5b06c77 commit b100209
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions mac/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ def running_browsers():
if re.search(b'Firefox\.app', ps) is not None:
running_browsers.append('firefox')

if re.search(b'Safari.app\/Contents\/MacOS\/Safari\ ', ps) is not None:
running_browsers.append('safari')
if re.search(b'com\.apple\.WebKit\.WebContent\n', ps) is not None or \
re.search(b'Safari.app\/Contents\/MacOS\/Safari\ ', ps) is not None:
running_browsers.append('safari')

if re.search(b'Safari\.app\/Contents\/MacOS\/SafariForWebKitDevelopment', ps) is not None:
running_browsers.append('webkit')
if re.search(b'com\.apple\.WebKit\.WebContent\.Development', ps) is not None or \
re.search(b'Safari\.app\/Contents\/MacOS\/SafariForWebKitDevelopment', ps) is not None:
running_browsers.append('webkit')

if re.search(b'Opera\.app', ps) is not None:
running_browsers.append('opera')
Expand Down

0 comments on commit b100209

Please sign in to comment.