Last active
November 14, 2019 22:27
-
-
Save incredimike/36eea656e33ed7f21cede6cae27ac18f to your computer and use it in GitHub Desktop.
Small script that will delete the localhost entry in the Firefox SiteSecurityServiceState.txt file, then prompt you to restart your browser using about:restartrequred. Restarting this way should preserve your tabs.
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
#!/bin/bash | |
# Path to the Firefox Profiles directory | |
FF_PROFILE_PATH="$HOME/Library/ApplicationSupport/Firefox/Profiles" | |
# Get the "Default" path for your profile. | |
# Alternatively look for '*.dev-edition-default' | |
FF_PROFILE_DIR=`cd $FF_PROFILE_PATH; find . -maxdepth 1 -name '*.default' | cut -sd / -f 2-` | |
# Remove the localhost line in the file, and create a backup | |
sed -i.bak '/localhost/d' $FF_PROFILE_PATH/$FF_PROFILE_DIR/SiteSecurityServiceState.txt | |
# Prompt to restart Firefox | |
/Applications/Firefox.app/Contents/MacOS/firefox -new-tab "about:restartrequired" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment