I'm creating extensions for YouTube, and I wrote the following in manifest:
"content_scripts":[
{
"matches": [
"https://www.youtube.com/*"
],
"js": [
"content_script.js"
]
}
],
When I opened the youtube.com
page, it responded, but it didn't respond when I clicked on the video and changed to www.youtube.com/watch?v=_somePath
.
How can I detect changes?
Tried:
I flew to www.youtube.com/watch?v=_somePath
from the beginning and it responded.
For this reason, if I click on a video on YouTube, is it just drawing a video from somewhere?
The possibility is to fill in a program that automatically detects changes in the path from script and "content_scripts" can only be ignited once, but I couldn't do it because I wasn't good enough.
I have a question because I didn't understand even after I looked it up.
I would appreciate it if you could let me know.
I will close the question as it has probably been resolved.
Using "background_scripts" to pick up chrome.tabs.onUpdated from chrome api and send it to context seems to be the shortest way.It will take some time, but I would like to try it.
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
578 Understanding How to Configure Google API Key
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.