Hi Aaron,

I am glad you posted this. I like bookmarklets. I run one a bit like this via AppleScript on my mac. This has an advantage of letting me add a keyboard to send straight to the clipboard.

I am going to add the indieweb mark up to that using Chris’s script for reference. Like you I couldn’t get it working at first I had to mess around with he single and double quotes. This works for me:

.gist table { margin-bottom: 0; }

javascript:(function(){let text=""; if(window.getSelection()!=''){text=window.getSelection().toString()+'n';}prompt('Press Ctrl+C, Escape','<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>');})()

<a href="https://gist.github.com/troutcolor/4235360dff2769d3efa7e10bffe7fb22/raw/b6bd40f1cc6aaa810d47e00432e4e0da8341208f/via-indie-web-bookmarklet" rel="nofollow ugc">view raw</a>
<a href="https://gist.github.com/troutcolor/4235360dff2769d3efa7e10bffe7fb22#file-via-indie-web-bookmarklet" rel="nofollow ugc">via-indie-web-bookmarklet</a>
hosted with ❤ by <a href="https://github.com" rel="nofollow ugc">GitHub</a>

I’ve not got much of a handle on JavaScript so YMMV.