Chrome扩展程序内容脚本未注入iframe

时间:2016-09-09 17:00:45

标签: google-chrome-extension

我们的manifest.json包含:

  "content_scripts": [
    {
      "js": [ "content-script.js" ],
      "run_at": "document_idle",
      "matches": ["https://*.example.com/*"]
    }
  ],

内容脚本会在example.com正确地注入我们的网页,除非有人将我们的网页嵌入到他的网页上的iframe中。如果我们要保留example.com,我们的扩展程序是否有办法将内容脚本注入指向"matches": ["https://*.example.com/*"]的所有iframe?我们知道可以使用"matches": ["https://*/*"], "all_frames": true,但我们并不想要求更广泛的权限。

0 个答案:

没有答案
相关问题