Add snippets and functions for linking to DW/AO3 users

master
trémeur 2 years ago
parent 363ec42825
commit 2f29030adb

@ -0,0 +1,29 @@
(defun dwuser ()
(interactive)
(setq theuser (read-string "DW username: "))
(insert (concat "<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" theuser ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/user.png\" alt=\"[personal profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /></a><a href=\"https://" theuser ".dreamwidth.org/\"><b>" theuser "</b></a></span>")))
(defun dwcomm ()
(interactive)
(setq theuser (read-string "DW comm name: "))
(insert (concat "<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://" theuser ".dreamwidth.org/profile\"><img src=\"https://www.dreamwidth.org/img/silk/identity/community.png\" alt=\"[community profile]\" width=\"17\" height=\"17\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /></a><a href=\"https://" theuser ".dreamwidth.org/\"><b>" theuser "</b></a></span>")))
(defun ao3user ()
(interactive)
(setq theuser (read-string "AO3 username: "))
(insert (concat "<span style=\"white-space: nowrap;\" class=\"ljuser\"><a href=\"https://archiveofourown.org/users/" theuser "/profile\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" alt=\"[archiveofourown.org profile]\" width=\"16\" height=\"16\" style=\"vertical-align: text-bottom; border: 0; padding-right: 1px;\" /></a><a href=\"https://archiveofourown.org/users/" theuser "\"><b>" theuser "</b></a></span>")))
(defun ao3safe-dwuser ()
(interactive)
(setq theuser (read-string "DW username: "))
(insert (concat "<a href=\"https://" theuser ".dreamwidth.org/profile\" rel=\"nofollow\"><img src=\"https://www.dreamwidth.org/img/silk/identity/user.png\" width=\"17\" height=\"17\" /></a><b><a href=\"https://" theuser ".dreamwidth.org\" rel=\"nofollow\">" theuser "</a></b>")))
(defun ao3safe-dwcomm ()
(interactive)
(setq theuser (read-string "DW comm name: "))
(insert (concat "<a href=\"https://" theuser ".dreamwidth.org/profile\" rel=\"nofollow\"><img src=\"https://www.dreamwidth.org/img/silk/identity/community.png\" width=\"17\" height=\"17\" /></a><b><a href=\"https://" theuser ".dreamwidth.org\" rel=\"nofollow\">" theuser "</a></b>")))
(defun ao3safe-ao3user ()
(interactive)
(setq theuser (read-string "AO3 username: "))
(insert (concat "<a href=\"https://archiveofourown.org/users/" theuser "/profile\" rel=\"nofollow\"><img src=\"https://p.dreamwidth.org/b164c54b26e4/-/archiveofourown.org/favicon.ico\" width=\"16\" height=\"16\" /></a><b><a href=\"https://archiveofourown.org/users/" theuser "\" rel=\"nofollow\">" theuser "</a></b>")))

@ -0,0 +1,4 @@
# name: ao3-user
# key: ao3user
# --
@@html:<user name="$1" site="ao3">@@$0
Loading…
Cancel
Save