I often want to copy the link to a page I'm viewing in the browser to the clipboard to paste it in a note or document that I'm editing. These are bookmarklets and user scripts to help with this task.
copy_markdown_link_bookmarklet.js
: A bookmarklet that copies the the title and URL of the current page to the clipboard as a Markdown-formatted link. This works in Chrome, but not in Firefox, I think because "Writing to the clipboard is available without permission in secure contexts and browser extensions, but only from user-initiated event callbacks. Browser extensions with the "clipboardWrite" permission can write to the clipboard at any time." (See https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API)copy_markdown_link_userscript.js
: A user script that copies the the title and URL of the current page to the clipboard as a Markdown-formatted link. I wrote this because Firefox didn't seem to support providing clipboard access to a bookmarklet. I've successfully run this using the Tampermonkey user script manager.copy_rendered_link_userscript.js
: A user script that copies the title and URL of the current page to the clipboard as an HTML link. This script sets the mime type so if you paste the link into a Google doc or Evernote note, it will be pasted as a rendered link. I've successfully run this using the Tampermonkey user script manager.
I found the extension Copy as Markdown and it worked, even on Google Docs. I think using that description instead of the user script is the easiest option on Firefox.