This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Option Explicit | |
' Creates a Backup Script named Fx-backup-recoveryJS(profilefoldername).vbs in your (My) Documents folder to copy | |
' recovery.jsonlz4 or sessionstore.jsonlz4 from your default profile to an FxSessions folder in your (My) Documents folder | |
' v0.3 - 25 May 2019 - jscher2000 - MPL 2.0 license | |
Dim oShell, sAppData, sDocsFolder | |
' Get APPDATA path and My Documents path | |
Set oShell = CreateObject("Wscript.Shell") | |
sAppData = oShell.expandEnvironmentStrings("%APPDATA%") + "\Mozilla\Firefox" | |
sDocsFolder = oShell.SpecialFolders.Item("MyDocuments") | |
' Check for Firefox's installs.ini file |
This file contains hidden or 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
// Override @page{margin} rule if found | |
var docSS = document.styleSheets, ss, ess; | |
for (var i=0; i<docSS.length; i++){ | |
if (!docSS[i].disabled){ | |
// check content of style sheet for @page (type 6 style sheet) | |
// https://developer.mozilla.org/en-US/docs/Web/API/CSSRule#Type_constants | |
ss = docSS[i]; | |
for (var j=0; j<ss.cssRules.length; j++){ | |
if (ss.cssRules[j].type == 6){ // Page sheet | |
if (ss.cssRules[j].cssText.indexOf('margin') > -1){ |
This file contains hidden or 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 |
NewerOlder