我正在制作一个 chrome 扩展,我很难找到如何让我的 content.js 在我想要的页面上运行。
我的manifest.json有这个:
"content_scripts": [{
"js": ["content.js"],
"matches": ["https://www.example.com/*"]
}]
现在我知道这将允许https://www.example.com/(any_path)运行 content.js,但是,我正在尝试让它在https://www.example.com上运行。 *,例如我希望扩展程序在https://www.example.com.au和https://www.example.com.uk等上工作。有什么办法吗?
我曾尝试在 manifest.js 中执行此操作,但似乎不起作用:
"content_scripts": [{
"js": ["content.js"],
"matches": ["https://www.example.com.*"]
}]
任何建议表示赞赏。
谢谢