- Have
devtools.chrome.enabled
enabled in yourabout:config
- Press Ctrl + Shift + J to open the browser console
- Run
snippet.js
in the resulting console - The result will be a list of
[title, videoId]
tuples - You can use this no-dependency, synchronous script to export the result to a CSV
Using clipboard to enter it makes the console lag, so you can fetch then eval it:
then use it like so:
eval(await (await fetch("https://raw.githubusercontent.com/adaltas/node-csv/master/packages/csv-stringify/dist/iife/sync.js")).text())
thecopy(csv_stringify_sync.stringify(records))
copy()
function will grab the result to your clipboard
- Go through all your tabs (
gBrowser.tabs
) - Filter out YouTube tabs by running an overcomplicated RegEx I found on Stack Overflow on the tab's URL, which is found in
tabObject.linkedBrowser.currentURI.displaySpec
. This also extracts the video ID regardless of URL format. - Remove notification count (like
(1) title
) from the title found intabObject.label
- Remove the trailing
- YouTube
from the end of the title