Chrome Extension won't load my JavaScript from the popup file

后端 未结 1 1163
甜味超标
甜味超标 2021-01-15 15:31

I\'m working on building a Chrome extension for a forum, but the problem is the JavaScript for my popup.html won\'t do anything. I added alert(\"popup.js running...\") at th

相关标签:
1条回答
  • 2021-01-15 15:39

    I had the same exact problem with an extension of mine, I believe it was fixed after I added this to the manifest file.

    manifest.json

    "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"
    

    More info here: http://developer.chrome.com/extensions/contentSecurityPolicy.html.

    0 讨论(0)
提交回复
热议问题