Created
September 26, 2023 06:26
-
-
Save Whoaa512/afa7b81dd210a35278100cf7a829047c to your computer and use it in GitHub Desktop.
Useful bookmarklets
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: (function () { | |
const vids = [ | |
...document.querySelectorAll('video'), | |
...document.querySelectorAll('audio'), | |
...[...document.querySelectorAll('iframe').values()].flatMap(el => { | |
try { | |
return [ | |
...el.querySelectorAll('video').values(), | |
...el.querySelectorAll('audio').values(), | |
]; | |
} catch (e) { | |
return []; | |
} | |
}), | |
]; | |
const defaultRate = 1.75; | |
if (vids.length > 0) { | |
const old = vids[0].playbackRate; | |
const rate = prompt(`New rate? Current:${old}`); | |
vids.forEach((vid) => { | |
vid.playbackRate = +(rate || (old === defaultRate ? 1 : defaultRate)); | |
}); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment