Skip to content

Instantly share code, notes, and snippets.

View Bortseb's full-sized avatar

Robert Best Bortseb

View GitHub Profile
@Bortseb
Bortseb / copy-to-clipboard-as-md-link-bookmarklet.md
Created March 1, 2019 10:40 — forked from mayosuke/copy-to-clipboard-as-md-link-bookmarklet.md
Create Bookmarklet (browser bookmark that executes Javsacript) to copy a browser window's page title and URL as markdown link style to a clipboard
@Bortseb
Bortseb / copy-to-clipboard-bookmarklet.md
Created March 1, 2019 10:40 — forked from brunohq/copy-to-clipboard-bookmarklet.md
Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard

Copy-to-clipboard Bookmarklet

Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard.

This is the base javascript:

(function (text) {
  var node = document.createElement('textarea')
  var selection = document.getSelection()