Created
October 4, 2018 14:19
-
-
Save lap00zza/4fe3edc955e6e6cfcbd2c8bd3002ba2c to your computer and use it in GitHub Desktop.
Most websites don't add anchors to headings. Its important because you can bookmark it at that spot instead of scrolling all the way down. This bookmarklet helps solve that.
This file contains 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:(document.querySelectorAll("h1[id],h2[id],h3[id],h4[id],h5[id],h6[id]").forEach(x => x.innerHTML = `<a href="#${x.id}">${x.innerHTML}</a>`)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment