Garvit Galgat

OCT 2020 · BROWSER EXTENSION

LooperForYT

Repeating the bit I wanted to watch

View source

JavaScript · HTML · CSS · Chrome extension APIs

I wanted to loop a particular section of a YouTube video. Replaying the whole video wasn’t what I needed.

How could I make just that section repeat?

I could build one?

While looking for a way to do this, I found out that I could build my own browser extension. So I went with that and started figuring out how to make it loop the section I wanted.

Pick a section. Repeat.

The extension had four controls: Start, Stop, Loop, and End. Start and Stop marked the part of the video to repeat; End turned the loop off.

Underneath, JavaScript checked the video’s playback position and sent it back to the start of the section when it reached the end. That was the feature I had wanted to add.