Skip to content

Instantly share code, notes, and snippets.

@codexss
Created April 17, 2019 07:59
Show Gist options
  • Save codexss/c75df42b00e758850eaa8049dcf499b5 to your computer and use it in GitHub Desktop.
Save codexss/c75df42b00e758850eaa8049dcf499b5 to your computer and use it in GitHub Desktop.
javascript:(function(){var a=window.open("about:blank").document;var b=document.createElement("div");var c=location.href;b.appendChild(document.createTextNode(document.getElementsByTagName("html")[0].innerHTML));a.write("<!DOCTYPE html><html><head><title>view-source:"+c+'</title><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="http://www.google.com/s2/favicons?domain="'+c+' rel="icon" type="image/x-icon"/><link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/styles/github.min.css"><script src="//cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.min.js"><\/script><script src="//cdn.jsdelivr.net/npm/highlightjs-line-numbers.js/dist/highlightjs-line-numbers.min.js"><\/script><script>hljs.initHighlightingOnLoad();hljs.initLineNumbersOnLoad();<\/script><style>.hljs-ln-numbers{text-align:right;color:#808080;word-break:normal;white-space:nowrap;font-size:9px;font-family:Helvetica;user-select:none;box-sizing:border-box;width:31px;background-color:#f0f0f0;padding:0 4px!important;border-right:1px solid #bbbbbb!important;}.hljs-ln-code{padding-left:10px}td{word-break:break-all;white-space: pre-wrap;}.hljs{padding:0;padding:0;}</style></head><body style="margin: 0px;"><pre style="margin: 0px;"><code class="html">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n'+b.innerHTML+"\r\n&lt;/html&gt;</code></pre></body></html>");a.close()})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment