During my work on a Safari extension, I encountered an issue with adding an End Script to Youtube pages. The script functions properly when the initial Youtube page loads, but if I click any links within the page, nothing happens unless I open them in a new tab. Any explanation for this behavior?
The code snippet is quite simple and just displays an alert:
if (window.top === window) {
alert("Hello World");
}
For the Allowed Domains, I followed the pattern:
*.youtube.com