Repeat 1 YouTube video for as long as you want

Tram Ho

Spring rolls recently, I often listen to the song “A step love thousands of miles of pain” of Chu Duyen. Pretty girl, good singer, good guitar.

You can experience this link:

If you use the default YouTube loop, you will listen to the whole song over and over. However, I just like to listen to the singing, I do not like listening to the intro and outro at the beginning. So I wrote a small script, paste it into the console to perform this trick, convenient for sharing with everyone.


Replace in the simpleLoop function the startTime and endTime you want.


The above code is quite simple, you can imagine the following diagram:


If the current time of the video is less than or equal to the start time, or greater than the end time of the paragraph you want to repeat => is in the segment you do not want to hear => buffalo immediately to the start + set Timeout time is 1 cycle (endTime – startTime)

Conversely, if the current time is in the desired segment, the timeout time will be from the current time to the end time.

After calculating the timeout time, recursively call this check function again.

Save as tool

For convenience, I saved it as a tool in chrome’s bookmark bar. The following code snippet has additional start time and end time input, so you can easily use the saved steps as follows:

  1. Save any 1 bookmark
  2. Replace the URL with the code below

Each time you use it, simply click on the bookmark, enter the time you want to loop. I have made a small video for you to watch more visually here Make bookmark tool

If you encounter an error during the use process, or find the article has something wrong, what’s not optimal, please let me know ^^

Thank you for taking the time to read the article ^^

Source of article from my blog:

Share the news now

Source : Viblo