Skip to content

Instantly share code, notes, and snippets.

mconleys-MBP:mozilla-central mikeconley$ ./obj-artifact/dist/Nightly.app/Contents/MacOS/firefox --help
Usage: ./obj-artifact/dist/Nightly.app/Contents/MacOS/firefox [ options ... ] [URL]
where options include:
--g-fatal-warnings Make all warnings fatal
Firefox options
-h or --help Print this message.
-v or --version Print Firefox version.
--full-version Print Firefox version, build and platform build ids.
@mikeconley
mikeconley / Firefox tabs script.md
Last active February 5, 2022 16:19
A script you can execute in your Browser Console to generate a string representation of your tabs!

Update: the original version of this gist required you to put some stuff into your Browser Console. I've made it easier now - there's a Firefox add-on you can install instead:

https://mzl.la/3sfOF1R

This will add a button to your toolbar (the green square), which upon clicking will copy the grid to your clipboard. Have fun!

IndexedDB

  1. Set dom.indexedDB.storageOption.enabled to true, then restart the browser
  2. Go to a webpage, and in the devtools console, paste this in:
let request = indexedDB.open(name, { version: 1, storage: "persistent" });

DRM

@mikeconley
mikeconley / pip-captions.md
Last active March 17, 2022 21:19
Captions in Picture-in-Picture

Subtitle and caption support for many sites in Firefox's Picture-in-Picture player window is targeted to ship in Firefox 100.

Hi! If you're reading this, then you've asked me about or otherwise expressed interest in supporting captions / subtitles in Firefox's Picture-in-Picture feature.

As of this writing, Firefox does not currently support captions or subtitles in the player window. This is because most sites have invented their own mechanisms for display captions or subtitles. YouTube's captions, for example, are implemented in a completely different way from Netflix's.

This makes it rather difficult for us as a browser to develop a general solution to the subtitles / caption problem.

~Difficult, but not impossible. We're currently working on ways for us to develop site-specific behaviours for Picture-in-Picture. This allows Firefox's Picture-in-Picture feature to be smarter in how it interacts with specific video sites. In theory, this would allow us to detect the subtitles and captions and disp

// STEPS:
// 1: Make sure only the images you want are in the document (i.e., make a document with only the most recent headlines)
// 2: Scroll down to the bottom of that document to ensure Google Docs has lazy loaded all of the images
// 3: Run this in the console:
// ```
// copy(JSON.stringify([...document.querySelectorAll(".kix-canvas-tile-content image")].map(i => i.href.baseVal)))
// ```
// 4: Paste them in here:
let urls = [];
// 5: Increment this number to match the next Nightly blog post number:
/*!
*
* NOTE: This file is generated by webpack from components.jsx
* using the npm bundle task.
*
*/
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/*!
*
* NOTE: This file is generated by webpack from components.jsx
* using the npm bundle task.
*
*/
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
Call graph:
2199 Thread_77863 DispatchQueue_1: com.apple.main-thread (serial)
+ 2199 start (in libdyld.dylib) + 1 [0x7fff57fcc015]
+ 2199 main (in plugin-container) + 103 [0x10f26df07]
+ 2199 XRE_InitChildProcess(int, char**, XREChildData const*) (in XUL) + 4462 [0x11c2f58fe]
+ 2199 XRE_RunAppShell() (in XUL) + 546 [0x11c2f5d12]
+ 2199 nsAppShell::Run() (in XUL) + 567 [0x11acb5667]
+ 2199 nsBaseAppShell::Run() (in XUL) + 140 [0x11ac311bc]
+ 2199 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (in XUL) + 289 [0x118048ba1]
+ 2199 NS_ProcessNextEvent(nsIThread*, bool) (in XUL) + 73 [0x1179515d9]
@mikeconley
mikeconley / firefox-help.txt
Created April 8, 2019 19:20
Firefox --help
Usage: c:\Users\mconley\mozilla\mozilla-central\obj-debug\dist\bin\firefox.exe [ options ... ] [URL]
where options include:
-h or --help Print this message.
-v or --version Print Firefox version.
-P <profile> Start with <profile>.
--profile <path> Start with profile at <path>.
--migration Start with migration wizard.
--ProfileManager Start with ProfileManager.
--no-remote Do not accept or send remote commands; implies