如何解决Chrome 扩展中的 Google 搜索集成引发了策略错误
有人可以帮我吗?
我正在尝试在我的 chrome 扩展程序中使用谷歌搜索就绪 foкm。我从https://developers.google.com/custom-search/docs/element
当我不在扩展中尝试时,一切正常。在扩展中,它会引发错误。
HTML:
<div class="gcse-search"></div>
Manifest: {
"name": "Yoobinet test","version": "0.0.1","manifest_version": 2,"description": "This extension was created with the awesome extensionizr.com","homepage_url": "http://extensionizr.com","icons": {
"16": "icons/icon16.png","48": "icons/icon48.png","128": "icons/icon128.png"
},"default_locale": "en","browser_action": {
"default_icon": "icons/icon19.png","default_title": "browser action demo","default_popup": "src/browser_action/browser_action.html"
},"permissions" : [
"tabs","history"
],"chrome_url_overrides": {
"newtab": "src/override/override.html"
},"content_security_policy": "script-src 'self' https://cse.google.com/ https://www.google.com/cse/static/ http://clients1.google.com/complete/search object-src 'self' "
}
Error:
Refused to load the script 'chrome-extension://cse.google.com/adsense/search/async-ads.js' because it violates the following Content Security Policy directive.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。