callumlocke / json-formatter

Makes JSON easy to read.
https://chrome.google.com/webstore/detail/json-formatter/bcjindcccaagfpapjjmafapmmgkkhgoa?hl=en
BSD 3-Clause "New" or "Revised" License
3.76k stars 859 forks source link

Add support for about:blank pages #261

Open cable729 opened 10 months ago

cable729 commented 10 months ago

I use an app that opens a file's content in a new "about:blank" page. Is it possible to support that use-case? From what I can tell, all that's needed is to add "match_about_blank": true to the manifest.json file.

cable729 commented 10 months ago

Hmm, I added this line and built and loaded the extension. It doesn't trigger the extension.

cable729 commented 10 months ago

I also added "about:blank" to the permissions in the manifest. Not working still.

DarrenSem commented 10 months ago

I use an app that opens a file's content in a new "about:blank" page. Is it possible to support that use-case? From what I can tell, all that's needed is to add "match_about_blank": true to the manifest.json file.

@cable729 I just found this extension, and looking at the "Issues" tab and found this -- I agree that your request to support about:blank dynamically-populated pages is very reasonable. 😟 I'm not sure how likely it is that you will get your Pull Request merged though: https://github.com/callumlocke/json-formatter/pulls

callumlocke commented 8 months ago

@cable729 Can you explain more about the use case? I don't understand. In what circumstances does about:blank show any content?

DarrenSem commented 6 months ago

@cable729 Can you explain more about the use case? I don't understand. In what circumstances does about:blank show any content?

I think he means (and I mean) when your JavaScript does something like...

var win = window.open("about:blank", "_blank");
 window.document.write("...contents that are JSON...");