Skip to content

Instantly share code, notes, and snippets.

@clochix
Created November 18, 2013 13:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save clochix/7527463 to your computer and use it in GitHub Desktop.
Save clochix/7527463 to your computer and use it in GitHub Desktop.
extract urls of every tabs from the file `sessionstore.js` in a Firefox profile.
#!/usr/bin/env nodejs
//jshint node: true
require('fs').readFile('sessionstore.js', {encoding: 'utf8'}, function (err, data) {
"use strict";
var session;
if (err) {
throw err;
}
session = JSON.parse(data);
session.windows.forEach(function (window) {
window.tabs.forEach(function (tab) {
console.log(tab.entries.pop().url);
});
});
});
@nhoizey
Copy link

nhoizey commented Nov 18, 2013

J'ai forké pour générer du HTML : https://gist.github.com/nhoizey/7527818

@bflmpsvz
Copy link

bflmpsvz commented Aug 2, 2017

Well, I have Firefox, I have this scpript file, ... and what next?
I have tried it in the Scratchpad and the result is:
/*
Exception: SyntaxError: illegal character
@ Scratchpad/1:1
*/
What to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment