Skip to content

Instantly share code, notes, and snippets.

@troutcolor
Last active January 4, 2021 17:45
Show Gist options
  • Save troutcolor/4235360dff2769d3efa7e10bffe7fb22 to your computer and use it in GitHub Desktop.
Save troutcolor/4235360dff2769d3efa7e10bffe7fb22 to your computer and use it in GitHub Desktop.
Book marklet from ChristAldrich, updated to copy to clip.
javascript:(function(){let text = "";if (window.getSelection() != '') {text = window.getSelection().toString() + '\n';}var tocopy = '<p><small><cite class="h-cite via"><abbr title="via">ᔥ</abbr> <span class="p-author h-card">"' + text + '"</span> in <a class="u-url p-name" href="' + location.href + '" target="_blank" rel="noopener noreferrer" >' + document.title + '</a> (<time class="dt-published">' + document.lastModified + '</time>)</cite></small></p>';;d=document;d.body.appendChild(Object.assign(d.createElement('textarea'),{value:tocopy})).select();d.execCommand('copy');})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment