Last active
April 9, 2020 04:52
-
-
Save oaustegard/2c9da35ebc43cb1272e790ba9fa2935f to your computer and use it in GitHub Desktop.
Generates a "deep" or document fragment link to the nearest element with an id above the selected text
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:void(location.hash = "#" + window.getSelection().anchorNode.parentNode.closest("*[id]").id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment