(function () { console.log("HELLO FROM PLAYLIST!", Math.floor(Math.random() * 999)); function msgPlayEvt(type, target) { const payload = { type, url: PlaylistUtils.cleanVideoUrl(window.location.href), timestamp: target.currentTime, duration: target.duration, title: document.title.replace(/ - YouTube$/, ""), }; return browser.runtime.sendMessage(payload); } // YouTube is a SPA: advancing to the next video in a queue swaps in a new //