Skip to content
On this page

View page source

js
javascript: (function () {
  var w = window.open('about:blank'),
    s = w.document;
  s.write(
    '<!DOCTYPE html><html><head><title>Source of ' +
      location.href +
      '</title><meta name="viewport" content="width=device-width" /></head><body></body></html>'
  );
  s.close();

  var pre = s.body.appendChild(s.createElement('pre'));
  pre.style.overflow = 'auto';
  pre.style.whiteSpace = 'pre-wrap';
  pre.appendChild(s.createTextNode(document.documentElement.innerHTML));
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

References

The code above was copied from the following page: