I found a neat applescript on the internet:
-- Zaps the cookies, history, downloads, and cache files, then launches Safari
-- Sets Private Browsing
on run {}
do shell script " pre=/Users/$(whoami)/Library; rm -rf $pre/Cookies/Cookies.plist $pre/Safari/History.plist $pre/Safari/Downloads.plist $pre/Cache/Safari >/dev/null 2>&1; exit 0 "
activate application "Safari"
tell application "System Events" to tell application process "Safari"
click menu item "Private Browsing" of menu 1 of menu bar item "Safari" of menu bar 1
end tell
end run
I saved it as an application and put it in my dock. However, every time I run the application, another safari icon appears on my dock. Is there any way from preventing this from happening?
-- Zaps the cookies, history, downloads, and cache files, then launches Safari
-- Sets Private Browsing
on run {}
do shell script " pre=/Users/$(whoami)/Library; rm -rf $pre/Cookies/Cookies.plist $pre/Safari/History.plist $pre/Safari/Downloads.plist $pre/Cache/Safari >/dev/null 2>&1; exit 0 "
activate application "Safari"
tell application "System Events" to tell application process "Safari"
click menu item "Private Browsing" of menu 1 of menu bar item "Safari" of menu bar 1
end tell
end run
I saved it as an application and put it in my dock. However, every time I run the application, another safari icon appears on my dock. Is there any way from preventing this from happening?