lundi 25 janvier 2021

Why are my extension buttons not working?

I created a tuner extension which is working while coding. When I uploaded to web store or try to run it in other browsers, the buttons won't work. I think it doesn't see the js codes and I don't know the problem. Can someone help me? (It works in html document but it's not working as an extension through developer mode)

Here's the manifest.json

{
"name" : "Guitarr Tunerr Extension",
"version":"1.00",
"description":"Quickly Tune your Guitar with One Click",
"manifest_version":2,
"background": {
    "persistent":true,
    "scripts": ["background.js"]
},

"browser_action":
{        
    "default_icon": "./assets/img/48x48.png",
    "default_popup": "popup.html"
},

"icons":{
    "16": "./assets/img/16x16.png" ,
    "48": "./assets/img/48x48.png",
    "128": "./assets/img/128x128.png"

}

}

And here's the error on developer tools:

Refused to execute inline event handler because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.




Aucun commentaire:

Enregistrer un commentaire