Remove #fedilove on chat and statuses at UI level + some UI improvements
This commit is contained in:
parent
0f2bf7fcfe
commit
e88cb59b31
|
@ -20,8 +20,8 @@
|
||||||
<img alt="Your possible crush" src="/missing.png"/>
|
<img alt="Your possible crush" src="/missing.png"/>
|
||||||
</div>
|
</div>
|
||||||
<div id="name">
|
<div id="name">
|
||||||
<a href="/">...</a>
|
<a href="/"><span class="account-display-name">...</span></a>
|
||||||
<span>-</span>
|
<span id="acct">-</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="back">
|
<div id="back">
|
||||||
<a href="/direct">
|
<a href="/direct">
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
accountName: ({ account }) => (account.display_name || account.username),
|
accountName: ({ account }) => (account.display_name || account.username),
|
||||||
massagedAccountName: ({ accountName, emojis, $autoplayGifs, $omitEmojiInDisplayNames }) => {
|
massagedAccountName: ({ accountName, emojis, $autoplayGifs, $omitEmojiInDisplayNames }) => {
|
||||||
accountName = escapeHtml(accountName)
|
accountName = escapeHtml(accountName)
|
||||||
|
accountName = accountName.replace(/#fedilove/gi, '').trim();
|
||||||
|
|
||||||
if ($omitEmojiInDisplayNames) { // display name emoji are annoying to some screenreader users
|
if ($omitEmojiInDisplayNames) { // display name emoji are annoying to some screenreader users
|
||||||
const emojiFreeDisplayName = removeEmoji(accountName, emojis)
|
const emojiFreeDisplayName = removeEmoji(accountName, emojis)
|
||||||
|
|
|
@ -89,7 +89,7 @@ div#chat-party-global {
|
||||||
margin: auto 0;
|
margin: auto 0;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
span {
|
span#acct {
|
||||||
margin: auto 0;
|
margin: auto 0;
|
||||||
margin-left: .5em;
|
margin-left: .5em;
|
||||||
color: #8a8a8a;
|
color: #8a8a8a;
|
||||||
|
|
|
@ -95,7 +95,7 @@ var fediloveUI = {
|
||||||
|
|
||||||
// to-do: check is it XSS safe to add it like this :) ??
|
// to-do: check is it XSS safe to add it like this :) ??
|
||||||
$('div#chat-party-global > div#image > img').attr('src', avatar);
|
$('div#chat-party-global > div#image > img').attr('src', avatar);
|
||||||
$('div#chat-party-global > div#name > a').html(name);
|
$('div#chat-party-global > div#name > a > span').html(name);
|
||||||
$('div#chat-party-global > div#name > span').text(acct);
|
$('div#chat-party-global > div#name > span').text(acct);
|
||||||
if (accid != 0) $('div#chat-party-global > div#name > a').attr('href', `/accounts/${accid}`);
|
if (accid != 0) $('div#chat-party-global > div#name > a').attr('href', `/accounts/${accid}`);
|
||||||
}
|
}
|
||||||
|
@ -147,6 +147,8 @@ var fediloveEvents = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (fediloveData.gotEmojifyTextFunction) {
|
if (fediloveData.gotEmojifyTextFunction) {
|
||||||
|
dname = dname.replace(/#fedilove/gi, '').trim();
|
||||||
|
dname = dname.replace(/\s+/g, ' ').trim().replace(/\s/g, ' ');
|
||||||
fediloveUI.paintChatAvatarAndName(accid, acct, avatar, fediloveFunctions.emojifyText(dname, emojis));
|
fediloveUI.paintChatAvatarAndName(accid, acct, avatar, fediloveFunctions.emojifyText(dname, emojis));
|
||||||
clearInterval(_this);
|
clearInterval(_this);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue