Closed mherger closed 7 years ago
In firefox:
Content Security Policy: The page’s settings blocked the loading of a resource
Works in Chrome and Opera, need to find some work around
Playing on console
document.head.appendChild(document.createElement("style"))
Chrome gives warning but style element is appended, so this is a bug on chrome that it works
Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'none'".
document.body.setAttribute("style","color:red")
Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'none'".
Currently I have no idea how to make it work with Content-Security-Policy: default-src 'none'
header from backend.
Injecting css from backgroud will work but adds disturbing delay before formatting. You can test this by installing git version of extension.
I am not sure is it ready for release. Probably needs a greater rewrite by moving all code to background.
Fixed in v0.20
How would I install v0.20?
The easiest way is to wait till addon awaiting review from mozilla.
For testing purpose you could clone this repo and "Load Temporary Add-on" on Firefox "Debug Add-ons" page.
Your add-on, JSON Lite 0.20, has been approved and is now available for download
This bug still exist in Safari, I have no idea how to fix it, waiting for inspiration
github.com commit lists like eg. https://api.github.com/repos/lauriro/json-lite/commits are not rendered as JSON. Expected?