aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 16e1935..81c2d4b 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -808,6 +808,17 @@ webapp"
(cdr (assoc 'descendants context))))))
(message "No Thread!")));)
+(defun mastodon-tl--copy-toot-url ()
+ "Copy URL of toot at point."
+ (interactive)
+ (let* ((toot (mastodon-tl--property 'toot-json))
+ (boosted (mastodon-tl--field 'reblog toot))
+ (url (if boosted
+ (cdr (assoc 'url (cdr (assoc 'reblog toot))))
+ (cdr (assoc 'url toot)))))
+ (kill-new url)
+ (message "Toot copied to the clipboard.")))
+
(defun mastodon-tl--delete-toot ()
"Delete user's toot at point synchronously."
(interactive)