tulios / json-viewer

It is a Chrome extension for printing JSON and JSONP.
https://chrome.google.com/webstore/detail/json-viewer/gbmdgpbipfallnflgajpaliibnhdgobh
MIT License
3.3k stars 673 forks source link

Unable to view JSON documents on Github (Blocked script execution) #187

Open benc-uk opened 6 years ago

benc-uk commented 6 years ago

Viewing any JSON documents on Github results in this error

"Blocked script execution in 'https://raw.githubusercontent.com/benc-uk/azure-arm/master/paas-web/basic-webapp/azuredeploy.json' because the document's frame is sandboxed and the 'allow-scripts' permission is not set."

This is an example file https://raw.githubusercontent.com/benc-uk/azure-arm/master/paas-web/basic-webapp/azuredeploy.json and this https://raw.githubusercontent.com/benc-uk/microservices-demoapp/master/package.json

However every JSON file I've tried results in the same error, seems to only be an issue when viewing from Github (the raw view)

lightdiscord commented 6 years ago

Same for me I'm on Chromium 63

jchappell82 commented 6 years ago

Same here on Chrome 63.0.3239.132

leftler commented 6 years ago

Also having the same problem. Chrome for Windows 64.0.3282.186 (Official Build) (64-bit)

Also there is a duplicate of this issue at https://github.com/tulios/json-viewer/issues/178 (ironic, the number is 178 and this is 187)

benc-uk commented 6 years ago

I don't think this is getting fixed, I've switched to using another extension. Shame as this was really nice

ffxsam commented 6 years ago

@benc-uk Which extension did you wind up using?

benc-uk commented 6 years ago

This one seems ok - https://github.com/gildas-lormeau/JSONView-for-Chrome

Pretty basic but it lets you apply your own CSS to style the JSON. A few others I looked at were even more basic or didn't work

lightdiscord commented 6 years ago

It's weird but you can see the JSON you can't see on GitHub by copying it and paste it into the search bar like this: 'json-viewer ' json-viewer

mrchief commented 6 years ago

I made a dark theme gist for gildas-lormeau/JSONView-for-Chrome that matches json-viewer styles. It's not as extensive (limitation of the other extension) as this extension but gets as close as possible.

JSONView.dark.theme.css

VladimirAlexiev commented 5 years ago

https://github.com/tulios/json-viewer/pull/209. If @tulios doesn't merge it soon, I'm switching too.

ngyikp commented 5 years ago

FYI this is fixed on Chrome 68 https://github.com/tulios/json-viewer/issues/178#issuecomment-406840323