Skip to content

Instantly share code, notes, and snippets.

@jscher2000
jscher2000 / decompress-jsonlz4-session-history.txt
Last active March 29, 2019 22:36
Browser Console code snippet to Decompress Firefox 56 jsonlz4 Session History file
/*
FOR FIREFOX 66+, USE THE FOLLOWING SCRIPT INSTEAD:
https://gist.github.com/jscher2000/4403507e33df0918289619edb83f8193
NOTE: BEFORE RUNNING THIS SCRIPT, CHECK THIS SETTING:
Type or paste about:config into the address bar and press Enter
Click the button promising to be careful
In the search box type devt and pause while Firefox filters the list
If devtools.chrome.enabled is false, double-click it to toggle to true
@jscher2000
jscher2000 / download-progress-button.css
Created June 21, 2017 16:09
Style Firefox downloads toolbar button as a progress bar with enlarged text (compatible with Firefox 54)
/* Style Downloads button (show progress) and Panel (show details after completion) */
/* TOOLBAR BUTTON TWEAKS */
/* During a download, hide the arrow */
#downloads-button[progress] #downloads-indicator-icon {
display: none !important;
}
/* During a download, force display of progress bar */
#downloads-button[progress] #downloads-indicator-progress-area {
display: -moz-box !important;
visibility: visible !important;
@jscher2000
jscher2000 / scroungehistory.js
Created June 18, 2017 17:33
Console Script to Scrounge Title and URLs from a Firefox Session History File
/* Open old session history file in a tab, open the web console, paste all of this, press Enter to execute.
If popup is blocked, allow popups then try again. */
function scrub(t){t=t.replace(/&/g,'&amp;'); t=t.replace(/>/g,'&gt;'); t=t.replace(/</g,'&lt;'); return t;}
if (window.confirm('Scrounge session URLs?')) var newwin=window.open();
if (newwin){
newwin.document.write('<!DOCTYPE html>\n<html><head><title>URLs Scrounged from Session History</title><meta http-equiv=\'Content-Type\' content=\'text/html; charset=UTF-8\'><style>.urllist>p{margin-left:2.25em}.urllist>p:nth-of-type(1){margin-left:0}</style></head>\n');
newwin.document.write('<body><h1>URLs Scrounged from Session History</h1>\n');
var out=new Array();
var sess=document.body.textContent.split('"_closedWindows":[');
console.log(sess.length);