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
// Run code in Browser Console after enabling chrome debugging -- | |
// about:config => devtools.chrome.enabled => true | |
// https://developer.mozilla.org/docs/Tools/Browser_Console | |
try { | |
var tabPromise = SyncedTabs._internal.getTabClients(); | |
tabPromise.then((arrDevices) => { | |
if (arrDevices && arrDevices.length > 0){ | |
// Generate a string with the format of a bookmark export file | |
var d, e, out = '<!DOCTYPE NETSCAPE-Bookmark-file-1>\n<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">\n<TITLE>Bookmarks</TITLE>\n<H1>Bookmarks Menu</H1>\n<DL><p>\n'; | |
const escapeHtmlEntities = function(aText){return (aText || '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''')}; |
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
/* Export Current Tab Titles/URLs to CSV - Script for the Browser Console | |
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 | |
Paste this entire script into the command line at the bottom of the Browser Console (Windows: Ctrl+Shift+j) | |
Then press Enter to run the script. A save dialog should promptly open. |
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
// For Firefox's Web Console, creates the functions showAsPrint() and undoShowAsPrint() | |
// to roughly emulate print media and revert | |
function showAsPrint(){ | |
var docSS = document.styleSheets, ss, oldMedia, newMedia, rules; | |
var p2s = function(media){ | |
if (media.indexOf('all') > -1) return media; //no need to change | |
if (media == 'print') return 'all, wasprint'; //show on screen, too | |
if (media.indexOf('print') > -1 && media.indexOf('screen') > -1) return media; //no need to change | |
if (media == 'screen') return 'wasscreen'; //hide these rules | |
if (media.indexOf('screen') > -1) return media.replace('screen', 'wasscreen'); //hide these rules |
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
/* Decompression Script for the Browser Console | |
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 | |
Paste this entire script into the command line at the bottom of the Browser Console (Windows: Ctrl+Shift+j) | |
Then press Enter to run the script. A file picker should promptly open. |
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
/* Session Backup Script for the Browser Console | |
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 | |
Paste this entire script into the command line at the bottom of the Browser Console (Windows: Ctrl+Shift+j) | |
Then press Enter to run the script. A save dialog should promptly open. |
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
/* | |
Code to paste and run in the Browser Console | |
Requires devtools.chrome.enabled => true in about:config | |
Tested in Firefox 68.0.1 on Windows | |
*/ | |
// Create references to APIs we'll use | |
var ss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); | |
var io = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); | |
var ds = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties); |
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
// Run code in Browser Console after enabling chrome debugging -- | |
// about:config => devtools.chrome.enabled => true | |
// ** first device only ** | |
try { | |
var tabPromise = SyncedTabs._internal.getTabClients(); | |
tabPromise.then((arrTabs) => { | |
if (arrTabs && arrTabs.length > 0){ | |
var csv = 'Tabs from: ' + arrTabs[0].name + '\n\n"Title","URL"'; | |
for (var i=0; i<arrTabs[0].tabs.length; i++){ | |
csv += '\n'; |
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
/* Add Handler via Firefox Browser Console -- mailto: Yahoo! Mail | |
NOTE: BEFORE YOU CAN RUN THIS SCRIPT, IF YOU HAVEN'T ALREADY: | |
* 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 | |
Paste this entire script into the command line at the bottom of the Browser Console (Windows: Ctrl+Shift+j) | |
Then press Enter to run the script. A dialog should pop indicating whether the save was successful. |
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
/* 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,'&'); t=t.replace(/>/g,'>'); t=t.replace(/</g,'<'); 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); |
NewerOlder