From b1002095f1ccb10c37f7abc8b0cca9228d165878 Mon Sep 17 00:00:00 2001 From: Giovanni Collazo Date: Wed, 27 Nov 2013 05:16:55 -0800 Subject: [PATCH] Fix running browser detection on Mavericks This fix will properly detect Safari and Webkit unde Mac OS X 10.9 Mavericks --- mac/utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mac/utils.py b/mac/utils.py index 241f0c0..f477b07 100644 --- a/mac/utils.py +++ b/mac/utils.py @@ -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')