Skip to content

Instantly share code, notes, and snippets.

@freeatnet
Created May 30, 2013 06:16
Show Gist options
  • Save freeatnet/5676005 to your computer and use it in GitHub Desktop.
Save freeatnet/5676005 to your computer and use it in GitHub Desktop.
javascript:(function(){var%20syntaxHighlight=function(json){json=json.replace(/%26/g,'%26amp;').replace(/%3C/g,'%26lt;').replace(/%3E/g,'%26gt;');return%20json.replace(/(%22(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\%22])*%22(\s*:)%3F|\b(true|false|null)\b|-%3F\d+(%3F:\.\d*)%3F(%3F:[eE][+\-]%3F\d+)%3F)/g,%20function%20(match)%20{var%20cls='number';if(/^%22/.test(match))%20{if(/:$/.test(match)){cls='key';}else{cls='string';}}else%20if(/true|false/.test(match)){cls='boolean';}else%20if(/null/.test(match)){cls='null';}return%20'%3Cspan%20class=%22'%20+%20cls%20+%20'%22%3E'+match+'%3C/span%3E';});};var%20xhr=new%20XMLHttpRequest();var%20params=%22url=%22+encodeURIComponent(document.location.toString())+%22%26content=%22+encodeURIComponent(document.documentElement.innerHTML);xhr.open(%22POST%22,%22https://staging.trycurio.com/extractor/check%22,true);xhr.setRequestHeader(%22Content-Type%22,%22application/x-www-form-urlencoded%22);xhr.onreadystatechange=function(){if(this.readyState==4%20%26%26%20this.status==200){var%20temp=document.createElement('pre');temp.setAttribute(%22style%22,%22color:%20%23000;background-color:%20white;font-face:\%22Courier%20New\%22,%20monospace,%20serif;font-size:14px;max-width:100%25;overflow:scroll;position:absolute;z-index:25001;top:0;left:0;height:200px;%20}%22);temp.innerHTML=xhr.responseText.replace(/%3C/g,%22%26lt;%22).replace(/%3E/g,%22%26gt;%22);document.body.insertBefore(temp,document.body.childNodes[0]);};};xhr.send(params);})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment