Skip to content

Commit

Permalink
Merge pull request #220 from adamliter/fix/219
Browse files Browse the repository at this point in the history
Adds browser_exclude_rule for Safari
  • Loading branch information
gureckis committed Apr 26, 2016
2 parents e3806cc + f61e477 commit a3b9a8f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions psiturk/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ def advertisement():
(myrule == "pc" and user_agent_obj.is_pc) or\
(myrule == "bot" and user_agent_obj.is_bot):
browser_ok = False
elif (myrule == "Safari" or myrule == "safari"):
if "Chrome" in user_agent_string and "Safari" in user_agent_string:
pass
elif "Safari" in user_agent_string:
browser_ok = False
elif myrule in user_agent_string:
browser_ok = False

Expand Down

0 comments on commit a3b9a8f

Please sign in to comment.