代码之家  ›  专栏  ›  技术社区  ›  machineghost

Chrome在清单“权限”中的URL上给了我一个权限错误

  •  0
  • machineghost  · 技术社区  · 8 年前

    我有一个Chrome扩展,当我尝试运行时:

    chrome.tabs.executeScript(tabId, { code });
    

    我得到以下错误:

    _生成的\u background \u page.html:1 Unchecked runtime.lastError运行tabs.executeScript:无法访问url的内容“ https://docs.google.com/presentation/d/1-GbuMXy-CoQAi005-YCJ7Lq_73oVi-1qc-AUnsS6YjI/edit#slide=id.g36de8e2a97_0_0

    ... 但我的分机“权限”列表中有docs.google.com manifest.json

    “权限”:[ “存储”, “标签”, “http:// “https:// /", " https://docs.google.com/ ", “http:// .google.com网站/ ", “https:// .google.com网站/ ", ]

    正如你所看到的,我也有“标签”的权限,所以我不明白为什么我总是得到这个错误。有什么想法吗?

    background.js 开发工具控制台):

    chrome.permissions.getAll(all => console.log(all))
    

    {
      origins:["http://*.google.com/*", "http://*/*", "https://*.google.com/*", "https://*.gstatic.com/*", "https://*/*", "https://docs.google.com/*"],
      permissions: ["activeTab", "storage", "tabs"]
    }
    
    0 回复  |  直到 8 年前