26

I am new to the extension development
I have tried with permissions url as "<all_urls> "*" "http://*/*", "https://*/*" None of the pattern is working

Full manifest:

{
  "name": "Info",
  "description": "BS System Info",
  "version": "1.0",
  "manifest_version": 3,
  "background": {
    "service_worker": "background.js"
  },
  "content_scripts": [{
    "js": ["script.js"],
    "matches": ["http://*/*","https://*/*","<all_urls>"],
    "css" : []
}],
  "permissions": [
    "storage",
    "activeTab",
    "system.cpu",
    "system.memory",
    "system.storage",
    "system.display",
    "tabs",
    "scripting",
    "http://*/*", "https://*/*", "chrome-devtools://*/*"
],
  "action": {
    "default_popup": "index.html",
    "default_icon": {
        "16": "/images/icon_16.png",
        "32": "/images/icon_32.png",
        "48": "/images/icon_48.png",
        "128":"/images/icon_128.png"
      }
  }
}
Rajan Gunasekaran
  • 261
  • 1
  • 3
  • 4

2 Answers2

53

Site/URL permissions in ManifestV3 use a separate key: host_permissions

  "host_permissions": [
    "*://*.example.org/"
  ],
  "permissions": [
    "storage"
  ],

More info in the official migration guide, make sure to study it.

wOxxOm
  • 65,848
  • 11
  • 132
  • 136
0
"host_permissions": ["http://*/*", "https://*/*"],
Adriaan
  • 17,741
  • 7
  • 42
  • 75
  • 5
    Please read [answer] and [edit] your answer to contain an explanation as to why this code would actually solve the problem at hand. Always remember that you're not only solving the problem, but are also educating the OP and any future readers of this post. – Adriaan Mar 20 '23 at 10:02