forked from rDrama/rDrama
1
0
Fork 0

fix mention html (im retarded)

master
Aevann 2023-07-22 21:12:04 +03:00
parent fad7834983
commit a72c18bed7
6 changed files with 10 additions and 10 deletions

View File

@ -4097,7 +4097,7 @@ small, .small {
width: 28px;
height: 28px;
}
.profile-pic-20, .pp20, img[src*="/uid/"], img[src*="/pp/"]:not(img[alt^=":"]) {
.profile-pic-20, .pp20, img[src^="/uid/"], img[src^="/pp/"]:not(img[alt^=":"]) {
margin-right: 0.25rem !important;
width: 20px;
height: 20px;
@ -5397,7 +5397,7 @@ textarea {
}
}
.in-comment-image, .img, img[alt^="![]("],
.preview img:not(img[src*="/uid/"], img[src*="/pp/"], img[src$="/pic"], img[src$="/i/hand.webp"], img[src*="/e/"]) {
.preview img:not(img[src^="/uid/"], img[src^="/pp/"], img[src$="/pic"], img[src$="/i/hand.webp"], img[src*="/e/"]) {
max-height: 150px !important;
max-width: 100% !important;
border-radius: 0.2rem !important;
@ -5541,7 +5541,7 @@ img[src$="/i/hand.webp"]+img {
text-align: center;
object-fit: contain;
}
img[src$="/i/hand.webp"]+img[src*="/pp/"], img[src$="/i/hand.webp"]+img[src$="/pic"] {
img[src$="/i/hand.webp"]+img[src^="/pp/"], img[src$="/i/hand.webp"]+img[src$="/pic"] {
border-radius: 50%;
}
@keyframes pat-pfp-anim {

View File

@ -213,7 +213,7 @@ socket.on('online', function(data){
online += `<li>`
if (admin_level && Object.keys(data[1]).includes(u[0].toLowerCase()))
online += '<b class="text-danger muted" data-bs-toggle="tooltip" title="Muted">X</b> '
online += `<a class="font-weight-bold" target="_blank" href="/@${u[0]}" style="color:#${u[2]}"><img loading="lazy" class="mr-1" src="${SITE_FULL_IMAGES}/pp/${u[1]}">${u[0]}</a></li>`
online += `<a class="font-weight-bold" target="_blank" href="/@${u[0]}" style="color:#${u[2]}"><img loading="lazy" class="mr-1" src="/pp/${u[1]}">${u[0]}</a></li>`
online2 += `<br>@${u[0]}`
}
document.getElementById('online').innerHTML = online

View File

@ -412,7 +412,7 @@ def sanitize(sanitized, golden=True, limit_pings=0, showmore=False, count_emojis
u = users_dict.get(m.group(1).lower())
if not u or (v and u.id in v.all_twoway_blocks):
return m.group(0)
return f'<a href="/id/{u.id}"><img loading="lazy" src="{SITE_FULL_IMAGES}/pp/{u.id}">@{u.username}</a>'
return f'<a href="/id/{u.id}"><img loading="lazy" src="/pp/{u.id}">@{u.username}</a>'
sanitized = mention_regex.sub(replacer, sanitized)

View File

@ -34,7 +34,7 @@
<td>
{% if item[1] != "Unknown" %}
<a href="/id/{{item[2]}}">
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/pp/{{item[2]}}">
<img loading="lazy" src="/pp/{{item[2]}}">
@{{item[1]}}
</a>
{% endif %}
@ -45,7 +45,7 @@
Modmail
{% else %}
<a href="/id/{{item[4]}}">
<img loading="lazy" src="{{SITE_FULL_IMAGES}}/pp/{{item[4]}}">
<img loading="lazy" src="/pp/{{item[4]}}">
@{{item[3]}}
</a>
{% endif %}

View File

@ -105,7 +105,7 @@ Text 2
<tr>
<td>Pat User</td>
<td>:@snappypat:</td>
<td><span alt=":@snappypat:" data-bs-toggle="tooltip" title=":@snappypat:"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/hand.webp"><img alt=":@snappypat:" b loading="lazy" pat src="{{SITE_FULL_IMAGES}}/pp/3"></span></td>
<td><span alt=":@snappypat:" data-bs-toggle="tooltip" title=":@snappypat:"><img loading="lazy" src="{{SITE_FULL_IMAGES}}/i/hand.webp"><img alt=":@snappypat:" b loading="lazy" pat src="/pp/3"></span></td>
</tr>
<tr>
<td>Random Marsey</td>
@ -212,7 +212,7 @@ Text 2
<tr>
<td>Username Mention</td>
<td>@QuadNarca</td>
<td><a class="d-inline-block" href="/@QuadNarca"><img alt="@QuadNarca profile picture" loading="lazy" src="{{SITE_FULL_IMAGES}}/pp/29">@QuadNarca</a></td>
<td><a class="d-inline-block" href="/@QuadNarca"><img alt="@QuadNarca profile picture" loading="lazy" src="/pp/29">@QuadNarca</a></td>
</tr>
<tr>
<td>Subreddit Mention</td>

View File

@ -231,7 +231,7 @@
{% macro chat_group_template(id, m) %}
<div class="chat-group">
<a class="font-weight-bold userlink" target="_blank" {% if m %}style="color:#{{m['namecolor']}}" href="/@{{m['username']}}" {% endif %}><div class="avatar profile-pic-20-wrapper mr-1"><img loading="lazy" class="avatar-pic pp20 mr-1" {% if m %}src="{{SITE_FULL_IMAGES}}/pp/{{m['user_id']}}"{% endif %}><img class="avatar-hat profile-pic-20-hat hat" loading="lazy" {% if m %}src="{{m['hat']}}"{% endif %}></div>{% if m %}{{m['username']}}{% else %}NULL{% endif %}</a>
<a class="font-weight-bold userlink" target="_blank" {% if m %}style="color:#{{m['namecolor']}}" href="/@{{m['username']}}" {% endif %}><div class="avatar profile-pic-20-wrapper mr-1"><img loading="lazy" class="avatar-pic pp20 mr-1" {% if m %}src="/pp/{{m['user_id']}}"{% endif %}><img class="avatar-hat profile-pic-20-hat hat" loading="lazy" {% if m %}src="{{m['hat']}}"{% endif %}></div>{% if m %}{{m['username']}}{% else %}NULL{% endif %}</a>
<span class="text-black time ml-1 mb-3 text-center">{% if m %}{{m['time'] | timestamp}}{% else %}just now{% endif %}</span>
<input hidden class="user_id" {% if m %}value="{{m['user_id']}}"{% endif %}>
{% endmacro %}