Created
July 19, 2023 14:06
-
-
Save jpluimers/562331002c6b6f5ebdfe87edcd9ffcfd to your computer and use it in GitHub Desktop.
Bookmarklet which prompts an HTML anchor with the canonical post address
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:{var postID=document.getElementsByName("comment_post_ID")[0]?.value; a=document.createElement("a"); a.href=HighlanderComments.connectURL; a.pathname=''; a.search=`?p=${postID}`; a.hash=''; a.target="blank"; a.rel="noopener"; a.text=document.querySelector('meta[property="og:title"]')?.content; prompt("Anchor", a.outerHTML); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment