{"id":14010,"date":"2021-01-03T14:17:50","date_gmt":"2021-01-03T14:17:50","guid":{"rendered":"https:\/\/johnjohnston.info\/blog\/?p=14010"},"modified":"2021-01-03T14:17:50","modified_gmt":"2021-01-03T14:17:50","slug":"re-re-browser-bookmarklets-for-giving-credit","status":"publish","type":"post","link":"https:\/\/johnjohnston.info\/blog\/re-re-browser-bookmarklets-for-giving-credit\/","title":{"rendered":"Re: Re: Browser Bookmarklets for Giving Credit"},"content":{"rendered":"<p>Hi Aaron,<\/p>\n<p>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.<\/p>\n<p>I am going to add the indieweb mark up to that using <a href=\"https:\/\/boffosocko.com\/2020\/12\/08\/browser-bookmarklets-for-giving-credit\/\">Chris&#8217;s script<\/a> for reference. Like you I couldn&#8217;t get it working at first I had to mess around with he single and double quotes. This works for me:<\/p>\n<style>.gist table { margin-bottom: 0; }<\/style>\n<div style=\"tab-size: 8\" id=\"gist107200228\" class=\"gist\">\n<div class=\"gist-file\" translate=\"no\" data-color-mode=\"light\" data-light-theme=\"light\">\n<div class=\"gist-data\">\n<div class=\"js-gist-file-update-container js-task-list-container\">\n<div id=\"file-via-indie-web-bookmarklet\" class=\"file my-2\">\n<div itemprop=\"text\"\n      class=\"Box-body p-0 blob-wrapper data type-text  \"\n      style=\"overflow: auto\" tabindex=\"0\" role=\"region\"\n      aria-label=\"via-indie-web-bookmarklet content, created by troutcolor on 02:08PM on January 03, 2021.\"\n    ><\/p>\n<div class=\"js-check-hidden-unicode js-blob-code-container blob-code-content\">\n<p>  <template class=\"js-file-alert-template\"><\/p>\n<div data-view-component=\"true\" class=\"flash flash-warn flash-full d-flex flex-items-center\">\n  <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg><br \/>\n    <span><br \/>\n      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.<br \/>\n      <a class=\"Link--inTextBlock\" href=\"https:\/\/github.co\/hiddenchars\" target=\"_blank\">Learn more about bidirectional Unicode characters<\/a><br \/>\n    <\/span><\/p>\n<div data-view-component=\"true\" class=\"flash-action\">        <a href=\"{{ revealButtonHref }}\" data-view-component=\"true\" class=\"btn-sm btn\">    Show hidden characters<br \/>\n<\/a>\n<\/div>\n<\/div>\n<p><\/template><br \/>\n<template class=\"js-line-alert-template\"><br \/>\n  <span aria-label=\"This line has hidden Unicode characters\" data-view-component=\"true\" class=\"line-alert tooltipped tooltipped-e\"><br \/>\n    <svg aria-hidden=\"true\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" data-view-component=\"true\" class=\"octicon octicon-alert\">\n    <path d=\"M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z\"><\/path>\n<\/svg><br \/>\n<\/span><\/template><\/p>\n<table data-hpc class=\"highlight tab-size js-file-line-container\" data-tab-size=\"4\" data-paste-markdown-skip data-tagsearch-path=\"via-indie-web-bookmarklet\">\n<tr>\n<td id=\"file-via-indie-web-bookmarklet-L1\" class=\"blob-num js-line-number js-blob-rnum\" data-line-number=\"1\"><\/td>\n<td id=\"file-via-indie-web-bookmarklet-LC1\" class=\"blob-code blob-code-inner js-file-line\">javascript:(function(){let text = &quot;&quot;;if (window.getSelection() != &#39;&#39;) {text = window.getSelection().toString() + &#39;\\n&#39;;}var tocopy = &#39;&lt;p&gt;&lt;small&gt;&lt;cite class=&quot;h-cite via&quot;&gt;&lt;abbr title=&quot;via&quot;&gt;\u1525&lt;\/abbr&gt; &lt;span class=&quot;p-author h-card&quot;&gt;&quot;&#39; + text + &#39;&quot;&lt;\/span&gt; in &lt;a class=&quot;u-url p-name&quot; href=&quot;&#39; + location.href + &#39;&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot; &gt;&#39; + document.title + &#39;&lt;\/a&gt; (&lt;time class=&quot;dt-published&quot;&gt;&#39; + document.lastModified + &#39;&lt;\/time&gt;)&lt;\/cite&gt;&lt;\/small&gt;&lt;\/p&gt;&#39;;;d=document;d.body.appendChild(Object.assign(d.createElement(&#39;textarea&#39;),{value:tocopy})).select();d.execCommand(&#39;copy&#39;);})()  <\/td>\n<\/tr>\n<\/table>\n<\/div><\/div>\n<\/p><\/div>\n<\/div><\/div>\n<div class=\"gist-meta\">\n        <a href=\"https:\/\/gist.github.com\/troutcolor\/4235360dff2769d3efa7e10bffe7fb22\/raw\/1fe1a3abea3cb9ed4d710b4fede5ea17ce5bec98\/via-indie-web-bookmarklet\" style=\"float:right\" class=\"Link--inTextBlock\">view raw<\/a><br \/>\n        <a href=\"https:\/\/gist.github.com\/troutcolor\/4235360dff2769d3efa7e10bffe7fb22#file-via-indie-web-bookmarklet\" class=\"Link--inTextBlock\"><br \/>\n          via-indie-web-bookmarklet<br \/>\n        <\/a><br \/>\n        hosted with &#10084; by <a class=\"Link--inTextBlock\" href=\"https:\/\/github.com\">GitHub<\/a>\n      <\/div>\n<\/p><\/div>\n<\/div>\n<p>I&#8217;ve not got much of a handle on JavaScript so YMMV.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s script for reference. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"status","meta":{"mf2_syndication":[],"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"webmentions_disabled_pings":false,"webmentions_disabled":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[817],"tags":[648,1302,855,522,38],"post_format":[642],"class_list":{"0":"post-14010","1":"post","2":"type-post","3":"status-publish","4":"format-status","6":"category-reactions","7":"tag-aaron-davis","8":"tag-bookmarklet","9":"tag-chris-aldrich","10":"tag-indieweb","11":"tag-javascript","12":"post_format-post-format-status","13":"kind-reply","15":"h-entry","16":"hentry","17":"post-kind"},"better_featured_image":null,"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p57zFQ-3DY","jetpack_likes_enabled":false,"jetpack_sharing_enabled":true,"kind":false,"_links":{"self":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/14010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/comments?post=14010"}],"version-history":[{"count":2,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/14010\/revisions"}],"predecessor-version":[{"id":14012,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/posts\/14010\/revisions\/14012"}],"wp:attachment":[{"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/media?parent=14010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/categories?post=14010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/tags?post=14010"},{"taxonomy":"post_format","embeddable":true,"href":"https:\/\/johnjohnston.info\/blog\/wp-json\/wp\/v2\/post_format?post=14010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}