Created
June 5, 2024 17:44
-
-
Save salif/7ba750c69d47a8a5a4434cfa0e47f45c to your computer and use it in GitHub Desktop.
Revisions
-
salif created this gist
Jun 5, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ javascript:(function (w) {var vs = Array.from(w.document.body.querySelectorAll("video"));if (vs.length === 0) {w.document.querySelectorAll("iframe").forEach(vif => {vif.contentDocument?.body.querySelectorAll("video").forEach(vi => {vs.push(vi);});});};if (vs.length === 0) {w.alert("no videos!");} else {var v = vs.length === 1 ? vs[0]?.currentSrc : vs[w.Number.parseInt(w.prompt(vs.map((vv, ind) => ind + ": " + vv.currentSrc).join("\n"), "0"), 10)]?.currentSrc;if (v?.length > 0) { w.open(v, "_blank"); } else { w.alert("video src is empty!"); }};})(window);