[英]Enable cross domain permission in google chrome extension manifest.json
I'm creating a simple extension for Chrome. 我正在为Chrome创建一个简单的扩展程序。 This extension will display a mobile view of the current opened tab of Chrome.
此扩展程序将显示Chrome当前打开的标签页的移动视图。
Here is my manifest.json: 这是我的manifest.json:
{
"manifest_version": 2,
"name": "Responsive View",
"description": "This extension will Display Mobile View Of current opened Tab of Chrome",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": ["activeTab"]
// what code should be here to grant all permissions for cross domain response?
}
what code should be here for grant all permission of cross domain response
授予跨域响应所有权限的代码应在此处
Corresponding documentation is here: Match Patterns . 相应的文档在这里: 匹配模式 。
The easiest match pattern to capture all hosts is, literally, "<all_urls>"
. 从字面上看,最简单的匹配模式是
"<all_urls>"
。
If you want to limit this to http/https scheme, you can use "*://*/*"
如果要将其限制为http / https方案,则可以使用
"*://*/*"
Note that using either of those will create an install-time permission warning : 请注意,使用其中任何一个都会创建安装时权限警告 :
Add "Responsive View"?
添加“响应视图”?
It can:
它可以:
- Read and modify all your data on all websites you visit
阅读和修改您访问的所有网站上的所有数据
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.