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.34k stars 686 forks source link

Extension does not work for blob URLs #18

Open ashmind opened 10 years ago

ashmind commented 10 years ago

If I create an URL dynamically using URL.createObjectURL, the extension does not detect JSON when I navigate to it.

Test code:

var blob = new Blob(['{ "lastname": "Dresden", "occupation": "Wizard" }'], {type: 'application/json'});
var url = URL.createObjectURL(blob);
$('body').append($('<a>Link to a JSON blob</a>').attr({
    href: url,
    target: '_blank'
}));

See http://jsfiddle.net/fQKYb/.

tulios commented 10 years ago

Thanks, it is an important feature. I will fix it.

tulios commented 10 years ago

I did a little research and confirmed my first thought about it, chrome extensions has access just to some schemes ( := '*' | 'http' | 'https' | 'file' | 'ftp' | 'chrome-extension') as it says in https://developer.chrome.com/extensions/match_patterns. If you have any ideia of how to fix this problem I will apreciate. Sorry.

ashmind commented 10 years ago

Thanks for the research! Raised it with Chrome: https://code.google.com/p/chromium/issues/detail?id=388972

patrick99e99 commented 11 months ago

what ever ended up happening with this? it's the end of 2023 and json viewer still doesn't work on blob:https://somewhere.com/abc-123 ?