我想将内容脚本设置为所有嵌入的youtube视频,因此我在内容脚本中使用标记:
"content_scripts": [
{
"matches": [
"*://*.youtube.com/*"
],
"css": [
"app_player.css"
],
"js": [
"content.js"
],
"run_at": "document_end",
"all_frames": true
}
]
一切正常,但我看到,有两种类型的嵌入式YouTube视频:YouTube。com/embed和youtube nocookie。com。对于第二个,我的内容脚本不起作用。我该怎么办?
嵌入式代码的第二种情况为:
<video tabindex="-1" class="video-stream html5-main-video" controlslist="nodownload"
style="width: 815px; height: 458px; left: 0px; top: 19.2813px;"
src="blob:https://www.youtube-nocookie.com/85648de5-fa2c-4785-bc8c-1fdce53c8226">
</video>