google-chrome - "http://*/*"、 "https://*/*"和 "<all_urls>"在 Chrome 扩展程序的权限上下文中意味着什么

标签 google-chrome google-chrome-extension

我正在尝试了解 Google Chrome 扩展的工作原理。我正在研究manifest.json我遇到权限的文件 "http://*/*" , "https://*/*""<all_urls>"

谁能解释一下这些权限的含义吗?

最佳答案

  • "<all_urls>" :匹配以允许的方案开头的任何 URL( http:https:file:ftp: )。
  • "http://*/*" :匹配任何使用 http: 的 URL方案。
  • "https://*/*" :匹配任何使用 https: 的 URL方案。
  • "*://*/*" :匹配任何使用 https: 的 URL或http:方案。

如果您的 Chrome 扩展程序想要与页面上运行的代码进行交互,则需要这些权限。

Match patterns documentation

关于google-chrome - "http://*/*"、 "https://*/*"和 "<all_urls>"在 Chrome 扩展程序的权限上下文中意味着什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16096482/

相关文章:

google-chrome - Google Chrome浏览器扩展程序-等待页面加载

javascript - Chrome 扩展 : how to change origin in AJAX request header?

javascript - chrome 扩展中不存在 chrome.runtime.onConnect

javascript - Chrome 扩展程序 - 奇怪的执行顺序

google-chrome - 无法在 Chrome 中使用 D3.js 选择 <linearGradient>

html - Chrome 21 上的单选按钮白色背景、flash 对象和 iFame

jquery - 谷歌浏览器 jQuery 动画在谷歌浏览器中滞后

google-chrome - Google 的 Webspeech 服务器是否限制了我的请求?有解决办法吗?

javascript - Chrome 扩展程序将变量从 popup.js 传递到内容脚本

javascript - 从浏览器获取 mac 地址,包括 chrome、windows、safari、firefox