0

I'm making a Firefox extension but for some reason it's not working and I'm not exactly sure why. please help.

I'm trying to run this code in the extension's browser action popup:

<!DOCTYPE html>
<html>
    <head>
        <style>
            html {
            background-image: url('icon.jpeg');
            background-repeat: repeat;
            background-size: 50px 50px;
            color: black;
            font-family: 'Oswald', sans-serif;
            }
        </style>
    </head>
    <body>
        <h3>TEST</h3>
        <input id="input"><button id="button" onclick="console.log('hi')">ENTER</button>
    </body>
</html>

but when I do it gives me this error:

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).

what does it mean and how can I fix it?

  • 1
    Use a separate js file and addEventListener, see these [examples](https://stackoverflow.com/q/13591983). – wOxxOm Apr 27 '22 at 14:25

0 Answers0