json-viewer icon indicating copy to clipboard operation
json-viewer copied to clipboard

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

Open benc-uk opened this issue 8 years ago • 10 comments

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)

benc-uk avatar Dec 16 '17 13:12 benc-uk

Same for me I'm on Chromium 63

lightdiscord avatar Jan 06 '18 15:01 lightdiscord

Same here on Chrome 63.0.3239.132

jch-gh avatar Jan 12 '18 21:01 jch-gh

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)

leftler avatar Mar 03 '18 17:03 leftler

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

benc-uk avatar Mar 03 '18 17:03 benc-uk

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

ffxsam avatar Mar 03 '18 18:03 ffxsam

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

benc-uk avatar Mar 03 '18 18:03 benc-uk

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

lightdiscord avatar Mar 04 '18 10:03 lightdiscord

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

mrchief avatar Jun 13 '18 14:06 mrchief

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

VladimirAlexiev avatar Jul 21 '18 08:07 VladimirAlexiev

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

ngyikp avatar Sep 10 '18 13:09 ngyikp