extension manifest must request permission to access this host. manifest 3

在使用 chrome.scripting.executeScript() 時顯示無權限存取這個作用中的分頁.

解法:
https://developer.chrome.com/docs/extensions/develop/concepts/declare-permissions

manifest.json

  "host_permissions": [
    "https://www.developer.chrome.com/*"
  ],
  "optional_host_permissions":[
    "https://*/*",
    "http://*/*"
  ],

About the author

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *