diff --git a/js/share-this-clipboard.js b/js/share-this-clipboard.js index 9a8a1ea..f11c3aa 100644 --- a/js/share-this-clipboard.js +++ b/js/share-this-clipboard.js @@ -1 +1,17 @@ -!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e=e||self).ShareThisViaClipboard={})}(this,(function(e){"use strict";e.getShareUrl=function(e,r){var o=e.replaceAll("'","`")+" "+r;return"onclick=\"navigator.clipboard.writeText('"+o+"');alert('Copied the following text to the clipboard... \\n\\n "+o+"')\""},e.name="clipboard",e.render=function(e,r,o){return"'},Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e,r){ + "object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e=e||self).ShareThisViaClipboard={}) +} +(this,( +function(e){ + "use strict"; + e.getShareUrl = function(text,refUrl){ + const saneText = text.replaceAll("'", "`"); + const cbText = """ + saneText + "" " + refUrl; + return `onclick="navigator.clipboard.writeText('${cbText}');alert('copied the following text to the clipboard – ${cbText}')"`; + }, + e.name="clipboard", + e.render = function(text, rawText, refUrl){ + return"' + }, + Object.defineProperty(e,"__esModule",{value:!0}) +}));