Refused to execute inline script because it violates the following Content Security Policy directive
Hello, I get this error when trying to run the command on some sites like Github
VM326:4 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src github.githubassets.com". Either the 'unsafe-inline' keyword, a hash ('sha256-KIgcpH7gqwIKxznM7U5KZRvHsdti6BUhgTYeMgpZXjU='), or a nonce ('nonce-...') is required to enable inline execution.
Can this be worked around?
Is this on Firefox? Unless there's an extension that can bypass the CSP restriction, I don't see a way around it.
This is on Brave
I couldn't find a way to execute user-defined pre/post scripts on a page with CSP restrictions. Google has limited dynamic script injection on manifest v3 to protect users. One workaround is to use the "CORS Unblock" extension, temporarily enabling the "Remove Content-Security-policy Headers" option, and refreshing the page. However, this approach is not advisable.
I'll keep this open for suggestions.