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
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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