-
-
Save PeterMortensen/9a9213feaeed6b95a540b35376055c14 to your computer and use it in GitHub Desktop.
Extract URLs of every tab from the file `sessionstore.js` in a Firefox profile
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
#!/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); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment