I'm new to Chrome extensions. I know there's lots of similar questions and info out there, but none of it seems to address this problem.
I need my content script to execute on every page that matches *://*.youtube.com/watch?v=*
.
I've tried using the above value and *://*.youtube.com/*
as the match property, but neither works supposedly due to the way YouTube handles requests. I've also tried using the onhashchange
event, but of course YouTube doesn't use anchors in their URLs. I've read about webRequest
, but I don't need the function to be called when somebody is scrolling through the comments and the page loads more comments.
All I need is a way to call my content script when the URL changes. How exactly can I accomplish this?
Additionally, I cannot load the content script at document_start
because the extension scrapes the HTML and parses it.