admins copy IDs

This commit is contained in:
Bryce Covert
2020-08-24 21:48:58 -07:00
parent 7f75a3b849
commit f20bbf9e75
12 changed files with 41 additions and 16 deletions

View File

@@ -464,3 +464,12 @@
(- (t/in-days (t/interval (t/minus d (t/days 1)) today)))
(t/in-days (t/interval today d )))]
in))
(defn copy-to-clipboard [text]
(let [el (js/document.createElement "textarea")]
(set! (.-value el) text)
(.appendChild js/document.body el)
(.select el)
(js/document.execCommand "copy")
(.removeChild js/document.body el)))