Created
March 14, 2012 21:31
-
-
Save macolyte/2039673 to your computer and use it in GitHub Desktop.
Instant Safari Porn Mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Safari" to set theURL to URL of current tab of window 1 | |
if theURL contains "some unique part of your URL" then | |
tellapplication "Safari" | |
closecurrent tab ofwindow1 | |
endtell | |
set_private_browsing() | |
else | |
set_private_browsing() | |
tellapplication "Safari" | |
makenew tabinwindow1 | |
setURLofresultto "your URL" | |
endtell | |
end if | |
on set_private_browsing() | |
tellapplication "System Events" | |
tellprocess "Safari" | |
tellmenu bar 1 | |
tellmenu bar item "Safari" | |
tellmenu "Safari" | |
clickmenu item "Private Browsing" | |
endtell | |
endtell | |
endtell | |
endtell | |
endtell | |
end set_private_browsing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment