Skip to content

Instantly share code, notes, and snippets.

@nhoizey
Created September 23, 2016 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhoizey/afd1ea20b1575f0f2e4e4e9d5c1e8d67 to your computer and use it in GitHub Desktop.
Save nhoizey/afd1ea20b1575f0f2e4e4e9d5c1e8d67 to your computer and use it in GitHub Desktop.
Restore a Firefox session backed up with to Save My Tabs

Save My Tabs is a great Firefox extension, because Firefox is great, but crashes a lot (at least mine, with hundreds of tabs).

Unfortunately, Save My Tabs doesn't have any restoration function, so you can copy/paste all URLs yourself, or try this script.

This simple Shell script for Mac OS X will launch Firefox with all URLs present in the backup file you pass as parameter:

./restore-savemytabs.sh opentabs--20160913-1900.txt

Tabs groups (I use Simplified Tab Groups since Panorama deprecation), if you use some, are unfortunately not restored.

#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: provide the filename of the Save My Tabs backup"
exit -1
else
file="$@"
fi
cat "$file" | cut -d$'\t' -f2 | xargs /Applications/Firefox.app/Contents/MacOS/firefox --new-tab &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment