Skip to content

Instantly share code, notes, and snippets.

@edwardkenfox
Created November 30, 2018 10:59
Show Gist options
  • Save edwardkenfox/2ca53ec27437ded17a5551e9cab3ad51 to your computer and use it in GitHub Desktop.
Save edwardkenfox/2ca53ec27437ded17a5551e9cab3ad51 to your computer and use it in GitHub Desktop.
Bookmarklet that copies trello card title and link in markdown format
javascript:(function(){ var title = document.querySelector('.js-card-detail-title-input').value; var link = location.href.match(/https\:\/\/trello\.com\/c\/(\d|[A-z]){6,10}\//)[0]; var text = `[${title}](${link})` ; var b=document.createElement("textarea"), c=document.getSelection(); b.textContent=text, document.body.appendChild(b), c.removeAllRanges(), b.select(), document.execCommand("copy"), c.removeAllRanges(), document.body.removeChild(b); }());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment