Implement "Copy URL to Clipboard"

This commit is contained in:
arne 2025-11-18 19:46:44 +01:00
commit f41af48bb0
2 changed files with 11 additions and 2 deletions

View file

@ -330,7 +330,11 @@
[:nav
[:ul.controls
[:li.control-element.url
[:a {:href (:url post) :target "_blank"} "↗ Open original post"]]]]
[:a {:href (:url post) :target "_blank"} "↗ Open original post"]]
[:li.control-element.clipboard
[:a {:href "#" :on-click (fn [e]
(.preventDefault e)
(js/navigator.clipboard.writeText (:url post)))} "◎ Copy URL to clipboard"]]]]
#_[debug post]])
(defn- refresh-displayed-posts!