【发布时间】:2015-05-27 16:16:55
【问题描述】:
我有一个简单的 chrome 扩展,内容脚本应该在每个站点上执行,这适用于除此之外的所有站点:
https://chrome.google.com/webstore/developer/dashboard
它适用于任何其他网站(google、gmail、网上银行、stackoverflow)
manifest.json:
{
"manifest_version": 2,
"name": "Chrome extension not working on one site",
"short_name": "cenwoos",
"description": "This chrome extension does not work on chrome webstore site, the content script simply will not be executed.",
"version": "0.1.0",
"minimum_chrome_version": "38",
"permissions": [
"http://*/*",
"https://*/*"
],
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*"],
"js": ["content.js"]
}
]
}
content.js:
alert('this alert will not be displayed on chrome webstore page');
console.log('This is content script on url:', document.location.toString());
【问题讨论】:
标签: javascript google-chrome google-chrome-extension