diff --git a/src/components/popover.riot b/src/components/popover.riot index ab861a3..b9ce6e8 100644 --- a/src/components/popover.riot +++ b/src/components/popover.riot @@ -10,7 +10,7 @@
@@ -32,6 +32,13 @@ onUpdated(props, state) { this.updateColors(props, state); }, + copyToClipboard(e) { + navigator.clipboard.writeText(e.target.innerHTML); + e.target.style['background-color'] = '#8bc34a'; + setTimeout(() => { + e.target.style['background-color'] = null; + }, 4000); + }, };