Created
September 30, 2015 10:56
-
-
Save adriannier/2a018a2bbbcf20ceb44c to your computer and use it in GitHub Desktop.
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
-- Kill current Firefox process, if any | |
try | |
do shell script "killall firefox" | |
end try | |
-- Delete data | |
do shell script "rm -rf ~/Library/Application\\ Support/Firefox" | |
do shell script "rm -rf ~/Library/Caches/Firefox" | |
do shell script "rm -rf ~/Library/Caches/Mozilla" | |
do shell script "rm -rf ~/Library/Preferences/org.mozilla.firefox.plist" | |
do shell script "rm -rf ~/Library/Preferences/org.mozilla.crashreporter.plist" | |
-- Launch Firefox | |
tell application "Firefox" to activate | |
-- Skip initial dialogs | |
tell application "System Events" | |
tell process "Firefox" | |
set frontmost to true | |
-- Skip Import Wizard | |
key code 53 | |
-- Wait until first browser window appears | |
repeat 100 times | |
if exists window 1 then exit repeat | |
delay 0.1 | |
end repeat | |
if exists window 1 then | |
-- Skip setting Firefox as default browser | |
key code 53 | |
-- Close first tab with Firefox Sign Up form | |
keystroke "w" using command down | |
end if | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment