I am currently developing a Chrome extension that generates timestamps for specific points in YouTube videos and displays them as clickable links on the page. The timestamped link format looks like this:
Assuming i manipulated a part of the youtube web page to display a list of time stamps
<li><a href="https://www.youtube.com/watch?v=VdCcQ3m3yoo&t=0s"><strong>0:00</strong> - Introduction to the topic and the purpose of the video.</a></li>
My goal is to allow users to click on these timestamped links and have the video timeline navigate to the corresponding point without triggering a page refresh. However, currently, whenever I click on these links, the page reloads instead of smoothly navigating to the intended time in the video.
I have attempted another version of the link using a slightly different format:
<a href="watch?v=VdCcQ3m3yoo&t=0s">
But unfortunately, this approach also results in the page reloading upon clicking the link.
I'm seeking advice and guidance on how to resolve this issue. Is there a solution or workaround that I can implement in my Chrome extension to prevent the page from reloading while still enabling the smooth navigation to the specified time in the YouTube video? Any help would be greatly appreciated. Thank you!