Detect Youtube video change with injected javascript
问题 I am building an extension (some injected js) that adds some buttons to a youtube page, which works fine. My issue is that when a user clicks on another video (say in the right hand side list), the next video is loaded without an actual page reload. Is there any way to detect this change so that I can rerun my code? I have already tried things like binding to the hashchange event, to no avail. 回答1: The idea is simple: Use background.js to listen for url changes to a specific youtube tab using