/* To run this script in newer versions of Firefox, you need to use the "Scratchpad" tool. First time setup -- Enable Chrome debugging using one of these methods: (1) Developer Tools Settings * "3-bar" menu button > Developer > Web Console * Click the "gear" icon at the left end of the bar to open the settings panel * In the lower right of the settings panel, check the box for "Enable chrome debugging" * You can close the web console now. (2) about:config preferences editor * In a new tab, type or paste about:config in the address bar and press Enter. Click the button promising to be careful. * Type dev in the search box above the list and pause while Firefox filters the list * Doubleclick devtools.chrome.enabled to switch it from false to true * You can close about:config now. To run the script: * Select this entire page (Ctrl+a / Command+a) and copy it * Open the scratchpad: "3-bar" menu button > Developer > Scratchpad * On the scratchpad menu bar, find the Environment menu and change from Content to Browser * Paste this page into the scratchpad area * Click the Run button on the toolbar, and a file picker should pop up Modified from: http://forums.mozillazine.org/viewtopic.php?p=12098147#p12098147 */ function scrub(t){ t = converter.ConvertFromUnicode(t); t = t.replace(/&/g, "&"); t = t.replace(/>/g, ">"); t = t.replace(/Window ' + (i + 1) + ''); for (var j = 0, tabs = windows[i].tabs; j < tabs.length; j++) { out.push('

Tab ' + (j + 1) + '

\n
'); for (var entries = tabs[j].entries, k = entries.length - 1; k >= 0; k--) { if (k == entries.length - 2) out.push('

< Back (earlier pages visited in this tab):

'); out.push('

' + scrub((entries[k].title || "[Title Not Available]")) + '
' + scrub(entries[k].url) + '

'); } out.push("
"); } } var data = ''; data += "session contents"; data += ''; data += "

session contents

\n" + out.join("\n") + ""; var browser = win.gBrowser.getBrowserForTab( win.gBrowser.selectedTab = win.gBrowser.addTab("data:text/html;charset=utf-8;base64," + btoa(data))); }