Created
November 26, 2018 16:00
-
-
Save ryo-utsunomiya/5ef047e4fef5bcaf9cd8538471c26085 to your computer and use it in GitHub Desktop.
Browser bookmarklet to apply JavaScript syntax highlight with current page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(l=>{let e=l.createElement("link");e.rel="stylesheet",e.href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/github.min.css",l.body.appendChild(e),(e=l.createElement("script")).src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js",e.onload=(()=>{(e=document.createElement("script")).src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/javascript.min.js",e.onload=(()=>{l.querySelectorAll("pre").forEach(hljs.highlightBlock)}),l.body.appendChild(e)}),l.body.appendChild(e)})(document); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original source is here: https://gist.github.com/ryo-utsunomiya/a3e27dfdeb360860f073dec718229661