mkdir -p ~/bin
curl --proto "=https" --tlsv1.2 "https://gist.githubusercontent.com/msanders/57837aaf6f7da30dcc1eb0bdf6b0b733/raw/firefox_export_cookie_exceptions" > ~/bin/firefox_export_cookie_exceptions
curl --proto "=https" --tlsv1.2 "https://gist.githubusercontent.com/msanders/57837aaf6f7da30dcc1eb0bdf6b0b733/raw/firefox_restore_cookie_exceptions" > ~/bin/firefox_restore_cookie_exceptions
chmod u+x ~/bin/firefox_export_cookie_exceptions ~/bin/firefox_restore_cookie_exceptions
mkdir -p ~/.local/share/fxcookies
# NOTE: Firefox must be closed in order for restore to unlock the database.
# https://kb.mozillazine.org/Profile_folder_-_Firefox#Finding_the_profile_folder
~/bin/firefox_export_cookie_exceptions /path/to/fxprofile > ~/.local/share/fxcookies/exceptions.txt
~/bin/firefox_restore_cookie_exceptions /path/to/fxprofile ~/.local/share/fxcookies/exceptions.txt
Copyright Michael Sanders.
This work is licensed under the terms of the MIT license. For a copy, see https://opensource.org/licenses/MIT.