Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.
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
You can’t perform that action at this time.