From cb0bf74025cf9b182bdacebfb5c6099e7c77b0c9 Mon Sep 17 00:00:00 2001 From: Leandro Facchinetti Date: Sat, 12 Dec 2020 02:37:21 +0000 Subject: [PATCH] . --- index.ts | 10 ++++++++-- static/clipboard.min.js | 7 +++++++ static/scripts.js | 11 +++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 static/clipboard.min.js create mode 100644 static/scripts.js diff --git a/index.ts b/index.ts index 8a6b56c..86f0029 100644 --- a/index.ts +++ b/index.ts @@ -196,6 +196,8 @@ function layout(content: string): string { · Report an Issue

+ + `.trim(); @@ -222,10 +224,14 @@ function newInbox(): string { function created(identifier: string): string { return html`

- Sign up for the newsletter with
${feedEmail(identifier)} + Sign up for the newsletter with
${feedEmail(identifier)}

- Subscribe to the Atom feed at
${feedURL(identifier)} + Subscribe to the Atom feed at
${feedURL(identifier)}

Don’t share these addresses.
They contain an identifier that other diff --git a/static/clipboard.min.js b/static/clipboard.min.js new file mode 100644 index 0000000..28650f3 --- /dev/null +++ b/static/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.6 + * https://clipboardjs.com/ + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return o={},r.m=n=[function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o` + ); +new ClipboardJS(".copy-button").on("success", (event) => { + event.trigger.innerText = "Copied"; + window.setTimeout(() => { + event.trigger.innerText = "Copy"; + }, 500); +});