Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxfight3r/68cc5f3dbc5d09cfb30808f4c75798f2 to your computer and use it in GitHub Desktop.
Save tuxfight3r/68cc5f3dbc5d09cfb30808f4c75798f2 to your computer and use it in GitHub Desktop.
Format JSON bookmarklet
javascript:!function(){var n,e,r,i;n=window,e=document.body,r=JSON.parse,i=JSON.stringify,n.isf||(e.innerHTML="<pre>"+i(r(e.innerText),null,4).replace(/\"(.*)[^\:]\:/g,'<span style="color:#9C3636">$1&colon;</span>')+"</pre>",n.isf=!0)}();
//usage:
//save as bookmark and click it whenever you open a json response in a browser tab/window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment