aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-05-13 19:47:02 +0200
committermousebot <mousebot@riseup.net>2021-05-13 19:47:02 +0200
commita90fa1c483eaf9fa10ffc21f6bcf5ed18cb7eea1 (patch)
treeb63db49ee2fff7f278a519ba715339ae71a15730 /lisp
parent59109fb59269c3df9eb4c51adfb8929d8cadd8bb (diff)
copy url of toot at point
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)