Last active
December 14, 2015 00:18
-
-
Save hoffrocket/4997472 to your computer and use it in GitHub Desktop.
Applescript to disable java in safari
This file contains hidden or 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
#!/usr/bin/osascript | |
activate application "Safari" | |
tell application "System Events" | |
tell process "Safari" | |
click menu item "Preferences…" of menu 1 of menu bar item "Safari" of menu bar 1 | |
click button "Security" of tool bar 1 of window 1 | |
set theCheckbox to checkbox "Enable Java" of group 1 of group 1 of window "Security" | |
tell theCheckbox | |
if (its value as boolean) then click theCheckbox | |
end tell | |
click button 1 of window "Security" | |
end tell | |
end tell | |
You can also sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can run with something like this:
curl https://gist.github.com/hoffrocket/4997472/raw/disable-java.applescript | osascript