Is your feature request related to a problem? Please describe.
YouTube uses shallow routing so our current method of using load event listener doesn't work reliably whenever the video changes. Tthe popstate and hashchange events do not work as well
Describe the solution you'd like
Use a background script to send the current tab url to the content script, which will use the fetch() api to send the video_id to the Flask server. Make sure that this background script also only runs when the tab is on a YouTube video
Describe alternatives you've considered
Implement this in the Flask server using Starlette
Have the background script send the video_id directly to the Flask server and return that information to the content script so that the process is not client-sided
Is your feature request related to a problem? Please describe. YouTube uses shallow routing so our current method of using
load
event listener doesn't work reliably whenever the video changes. Tthepopstate
andhashchange
events do not work as wellDescribe the solution you'd like Use a background script to send the current tab url to the content script, which will use the fetch() api to send the video_id to the Flask server. Make sure that this background script also only runs when the tab is on a YouTube video
Describe alternatives you've considered
video_id
directly to the Flask server and return that information to the content script so that the process is not client-sided