Skip to content

Instantly share code, notes, and snippets.

@clochix
Created November 18, 2013 13:07
Show Gist options
  • Select an option

  • Save clochix/7527463 to your computer and use it in GitHub Desktop.

Select an option

Save clochix/7527463 to your computer and use it in GitHub Desktop.

Revisions

  1. clochix created this gist Nov 18, 2013.
    15 changes: 15 additions & 0 deletions extractsession.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/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);
    });
    });
    });