diff options
author | mousebot <mousebot@riseup.net> | 2021-05-13 19:47:02 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-05-13 19:47:02 +0200 |
commit | a90fa1c483eaf9fa10ffc21f6bcf5ed18cb7eea1 (patch) | |
tree | b63db49ee2fff7f278a519ba715339ae71a15730 /lisp/mastodon-tl.el | |
parent | 59109fb59269c3df9eb4c51adfb8929d8cadd8bb (diff) |
copy url of toot at point
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 11 |
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) |