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

Extension does not work for blob URLs

Open ashmind opened this issue 10 years ago • 4 comments

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/.

ashmind avatar Jun 26 '14 00:06 ashmind