I am trying to run a script after the youtube is loaded to querySelect a title but the script is not running. If I reload the page than it runs but I believe this happens because the previous page has already been loaded. I am trying to have it select the title on load, this is my manifest, I have tried run_at document_idle
{
"manifest_version": 2,
"version": "0.0.1",
"content_scripts": [
{ "matches": ["<all_urls>"],
"js": ["content.js"],
"run_at": "document_end" } ],
"background": {
"scripts": ["background.js"] },
"permissions": [ "activeTab",
"tabs" ]
}
In the script, I have tried window.onload,window.loaded, eventListener(load)