Last active
February 25, 2018 11:21
-
-
Save unarist/f0cf23796584b9a8e17a63c15844b766 to your computer and use it in GitHub Desktop.
Mastodon - Show domain on mentions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
注: Mastodon以外の投稿だと多分動かない | |
NOTE: only works on toots from Mastodon :p | |
(UserScript can probably get acct from any accounts...by accessing internal object of React) | |
*/ | |
/* | |
全体を常に表示 | |
Show whole acct always | |
*/ | |
.mention span { display: none } | |
.mention:after { content: attr(title) } | |
.mention:hover:after { text-decoration: underline } | |
/* | |
ドメインの頭文字まで表示 | |
Show first character of domain always | |
generated by [...Array(26).keys()].map(i => String.fromCharCode(97 + i)).map(c => `.mention[title*="@${c}"]:after { content: "@${c}…" }`).join("\r\n") | |
*/ | |
.mention[title*="@a"]:after { content: "@a…" } | |
.mention[title*="@b"]:after { content: "@b…" } | |
.mention[title*="@c"]:after { content: "@c…" } | |
.mention[title*="@d"]:after { content: "@d…" } | |
.mention[title*="@e"]:after { content: "@e…" } | |
.mention[title*="@f"]:after { content: "@f…" } | |
.mention[title*="@g"]:after { content: "@g…" } | |
.mention[title*="@h"]:after { content: "@h…" } | |
.mention[title*="@i"]:after { content: "@i…" } | |
.mention[title*="@j"]:after { content: "@j…" } | |
.mention[title*="@k"]:after { content: "@k…" } | |
.mention[title*="@l"]:after { content: "@l…" } | |
.mention[title*="@m"]:after { content: "@m…" } | |
.mention[title*="@n"]:after { content: "@n…" } | |
.mention[title*="@o"]:after { content: "@o…" } | |
.mention[title*="@p"]:after { content: "@p…" } | |
.mention[title*="@q"]:after { content: "@q…" } | |
.mention[title*="@r"]:after { content: "@r…" } | |
.mention[title*="@s"]:after { content: "@s…" } | |
.mention[title*="@t"]:after { content: "@t…" } | |
.mention[title*="@u"]:after { content: "@u…" } | |
.mention[title*="@v"]:after { content: "@v…" } | |
.mention[title*="@w"]:after { content: "@w…" } | |
.mention[title*="@x"]:after { content: "@x…" } | |
.mention[title*="@y"]:after { content: "@y…" } | |
.mention[title*="@z"]:after { content: "@z…" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment