Skip to content

Instantly share code, notes, and snippets.

@ebello
Forked from remy/view-source.js
Created March 4, 2010 15:50
Show Gist options
  • Save ebello/321823 to your computer and use it in GitHub Desktop.
Save ebello/321823 to your computer and use it in GitHub Desktop.
// bookmarklet to introspect the source of current page
javascript:(function(d,h){h=d.documentElement.innerHTML;d.open();d.write('<pre>'+('<!DOCTYPE html><html>'+h+'</html>').replace(/[<>]/g,function(m){return{'<':'&lt;','>':'&gt;'}[m]})+'</pre>')})(document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment