Content Security Policy (CSP) blocks scripts from Violentmonkey / Greasemonkey

I wanted to inject some codes on Github, however I received Content Security Policy errors. It’s because Github blocks this kind of injected code.

To bypass this restriction I installed the addon Content Security Policy Override (if you have Firefox you can install this Chrome addon using Chrome Store Foxified) then I applied the below rule in the addon’s settings :

[
  ["https://github\\.com/*", [
    ["script-src", "script-src 'self' 'unsafe-inline' 'unsafe-eval'"]
  ]]
]

Now my Violentmonkey script works.

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

*