如果网址是
index.js
,我想运行我的 https://www.themoviedb.org/movie/<any-movie-id>
,但如果它有像 https://www.themoviedb.org/movie/<any-movie-id>/<sub-path>
这样的子路径,则不希望它运行
"content_scripts": [
{
"matches": ["https://*.themoviedb.org/movie/*", "https://*.themoviedb.org/tv/*"],
"js": ["src/index.js"],
"css": ["src/index.css"]
}
]
您可以使用
exclude_globs
并执行类似的操作
"matches": [
"https://www.themoviedb.org/movie/*"
],
"exclude_globs": ["https://www.themoviedb.org/movie/*/*"]