gpt4 book ai didi

javascript - Chrome 扩展内容脚本不适用于 Chrome 网上商店页面

转载 作者:行者123 更新时间:2023-11-30 16:51:21 25 4
gpt4 key购买 nike

<分区>

我有一个简单的 chrome 扩展程序,其中包含应该在每个站点上执行的内容脚本,这适用于除此站点之外的所有站点:

https://chrome.google.com/webstore/developer/dashboard

它适用于任何其他网站(google、gmail、网上银行、stackoverflow)

list .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());

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com