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
// 1. Go to https://studio.youtube.com/ | |
// 2. Go to the "Content" (Channel content) page, which is the list of all your videos. | |
// 3. Run this in the browser's Javascript console. | |
// 4. Just copy the console text (contains all of the currently visible videos). | |
let lines = []; document.querySelectorAll("ytcp-video-section-content a#thumbnail-anchor").forEach((lbl) => { lines.push(lbl.getAttribute("aria-label")); let href = lbl.href.match(/video\/(.+?)\/edit$/); href = href ? "https://www.youtube.com/watch?v=" + href[1] : "Failed to retrieve link."; lines.push(href + "\n"); }); console.log(lines.join("\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
javascript:if("pictureInPictureEnabled"in document&&"querySelectorAll"in document){(async function(){const a=document.querySelectorAll("video");if(0===a.length)window.alert("Sorry, no videos on the page.");else if(0<a.length){const b=a[0];try{b===document.pictureInPictureElement?await document.exitPictureInPicture():await b.requestPictureInPicture()}catch(a){console.error(a)}}})()}else"pictureInPictureEnabled"in document?document.pictureInPictureEnabled||window.alert("Picture-in-Picture not available."):window.alert("Picture-in-Picture is disabled."); |
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
# Based on http://lua-users.org/wiki/DetectingUndefinedVariables, but extended to automate the code generation. | |
# Lua 5.1 | |
for f in *.lua; do luac-5.1 -p -l "$f" | grep ETGLOBAL | cut -d ';' -f 2 | sort | uniq | sed -E 's/^ (.+)$/local \1 = \1;/' > "_globals.${f}.txt"; done | |
# Lua 5.2 and 5.3 | |
for f in *.lua; do luac-5.3 -p -l "$f" | grep 'ETTABUP.*_ENV' | cut -d ';' -f 2 | cut -d ' ' -f 1-3 | sort | uniq | sed -E 's/^ _ENV "(.+)"\s*$/local \1 = \1;/' > "_globals.${f}.txt"; done | |
# The resulting log files will be overzealous (any non-"local"-declared vars from the same file will be seen as globals), | |
# so you'll still have to do manual work to remove the things that aren't necessary. But it's a lot better than doing |