Created
February 22, 2023 22:42
-
-
Save yanowitz/22837bca79a9e5d22cdc5cef6f4b59bb to your computer and use it in GitHub Desktop.
put this in your toolbar as a bookmarklet to change video speed
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:window.__make_option=function(e){const n=document.createElement("option");return n.innerText=e,n.value=e,n},window.__make_control=function(e){const n=document.createElement("div"),o=document.createElement("select");return o.appendChild(window.__make_option(.5)),o.appendChild(window.__make_option(1)),o.appendChild(window.__make_option(.75)),o.appendChild(window.__make_option(1.25)),o.appendChild(window.__make_option(1.5)),o.appendChild(window.__make_option(1.75)),o.appendChild(window.__make_option(2)),o.selectedIndex=1,o.addEventListener("change",n=>{e(Number(n.target.value))}),n.appendChild(o),n.style.position="absolute",n.style.right="0",n.style.bottom="0",n.style.zIndex="9999",n},window.__init=function(){for(const e of document.querySelectorAll("video")){const n=e.parentElement,o=document.createElement("div");e.remove(),o.appendChild(e),o.appendChild(window.__make_control(n=>e.playbackRate=n)),n.appendChild(o)}},window.__init(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment