Skip to content

Instantly share code, notes, and snippets.

@mason276752
Last active March 12, 2020 11:02
Show Gist options
  • Save mason276752/711d80c8d4bfea6cdc01d47a9249f02c to your computer and use it in GitHub Desktop.
Save mason276752/711d80c8d4bfea6cdc01d47a9249f02c to your computer and use it in GitHub Desktop.
youtube ab loop
javascript:aloop=document.getElementsByClassName('video-stream html5-main-video')[0].currentTime;if(aloop!=null &&bloop!=null){if(aloop!="undefined" && bloop!="undefined" && aloop!=bloop ){document.getElementsByClassName('video-stream html5-main-video')[0].addEventListener("timeupdate",function(){if(aloop>bloop&&document.getElementsByClassName('video-stream html5-main-video')[0].currentTime>aloop){document.getElementsByClassName('video-stream html5-main-video')[0].currentTime=bloop;}else if(bloop>aloop&&document.getElementsByClassName('video-stream html5-main-video')[0].currentTime>bloop){document.getElementsByClassName('video-stream html5-main-video')[0].currentTime=aloop;}},false);}}
javascript:bloop=document.getElementsByClassName('video-stream html5-main-video')[0].currentTime;if(aloop!=null &&bloop!=null){if(aloop!="undefined" && bloop!="undefined" && aloop!=bloop ){document.getElementsByClassName('video-stream html5-main-video')[0].addEventListener("timeupdate",function(){if(aloop>bloop&&document.getElementsByClassName('video-stream html5-main-video')[0].currentTime>aloop){document.getElementsByClassName('video-stream html5-main-video')[0].currentTime=bloop;}else if(bloop>aloop&&document.getElementsByClassName('video-stream html5-main-video')[0].currentTime>bloop){document.getElementsByClassName('video-stream html5-main-video')[0].currentTime=aloop;}},false);}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment