litejs / json-lite

Fast non-blocking JSON viewer for Chrome and Firefox
196 stars 17 forks source link

Feature request: automatically hyperlink URLs #30

Closed dregad closed 6 years ago

dregad commented 6 years ago

I started using JSON lite after upgrading Firefox to v57, because the Add-on I was using until now (JSONview) is not compatible with WebExtensions. There is one functionality that I miss: automatically hyperlinked URLs.

It would be great if you would consider adding detection of URLs in string data, and turn them into links.

Thanks for developping this tool !

lauriro commented 6 years ago

Do you mean urls in the middle of longer strings? Currently, if the entire string is url, it should be clickable, same as in JSONview.

dregad commented 6 years ago

@lauriro thanks for the prompt reply.

Do you mean urls in the middle of longer strings?

No, the entire string is an URL

if the entire string is url, it should be clickable

Sorry but I don't see any link... image This is the relevant extract from the raw JSON

{"nom":"Wifi","libelle":"Points Wifi","type_flux":"wifi","url_icone":"http:\/\/xxxxxxxx\/fileadmin\/xxxxxxxx\/templates\/images\/iparc\/icone\/__resolution__\/plan_wifi.png","url_flux":"http:\/\/xxxxxxxx\/themes\/environnement-urbain-espaces-verts\/espaces-verts\/iparc\/wifi\/wifis\/listWifis\/json\/typeWifi\/","date_maj":"2017-08-04"}

Note: I also tried without the escaped slashes (i.e. replaced \/ by / in the URL strings), same results

lauriro commented 6 years ago

According to the picture you are using different json viewer or Firefox native JSON viewer as in #12.

Native viewer can be disabled by toggling 'devtools.jsonview.enabled' flag in about:config page.

dregad commented 6 years ago

Duh. I did not even realize that... Thanks for enlightening me !

I confirm that after setting devtools.jsonview.enabled to false, I can now click the URL links. Thanks !

As a suggestion to avoid such situation in the future, maybe there could be a warning in the plugin's config page when the Firefox default JSON viewer is enabled.