fsd
parent
d1ff5ed69a
commit
d4ee04a4cc
|
@ -171,14 +171,17 @@ def sanitize(sanitized, noimages=False):
|
|||
else: new = old.lower()
|
||||
for i in re.finditer('(?<!"):([^ ]{1,30}?):', new):
|
||||
emoji = i.group(1).lower()
|
||||
if emoji.startswith("!"):
|
||||
classes = 'class="bigemoji mirrored" '
|
||||
if emoji.startswith("#!") or emoji.startswith("!#"):
|
||||
classes = 'class="mirrored" '
|
||||
remoji = emoji[2:]
|
||||
elif emoji.startswith("!"):
|
||||
classes = 'height=60 class="mirrored" '
|
||||
remoji = emoji[1:]
|
||||
elif emoji.startswith("#"):
|
||||
classes = ""
|
||||
remoji = emoji[1:]
|
||||
else:
|
||||
classes = 'class="bigemoji" '
|
||||
classes = 'height=60 '
|
||||
remoji = emoji
|
||||
|
||||
if path.isfile(f'./files/assets/images/emojis/{remoji}.webp'):
|
||||
|
@ -195,13 +198,13 @@ def sanitize(sanitized, noimages=False):
|
|||
if emoji.startswith("!"):
|
||||
emoji = emoji[1:]
|
||||
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
||||
sanitized = re.sub(f'(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" class="emoji mirrored" src="https://{site}/assets/images/emojis/{emoji}.webp">', sanitized)
|
||||
sanitized = re.sub(f'(?<!"):!{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{emoji}:" title=":!{emoji}:" delay="0" height=30 class="mirrored" src="https://{site}/assets/images/emojis/{emoji}.webp">', sanitized)
|
||||
|
||||
if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1
|
||||
else: session["favorite_emojis"][emoji] = 1
|
||||
|
||||
elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
||||
sanitized = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" class="emoji" src="https://{site}/assets/images/emojis/{emoji}.webp">', sanitized)
|
||||
sanitized = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=30 src="https://{site}/assets/images/emojis/{emoji}.webp">', sanitized)
|
||||
|
||||
if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1
|
||||
else: session["favorite_emojis"][emoji] = 1
|
||||
|
|
|
@ -749,7 +749,7 @@
|
|||
|
||||
{% if v %}
|
||||
<script src="/assets/js/marked.js?v=1"></script>
|
||||
<script src="/assets/js/comments_v.js?v=82"></script>
|
||||
<script src="/assets/js/comments_v.js?v=83"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="/assets/js/clipboard.js?v=1"></script>
|
||||
|
|
|
@ -885,7 +885,7 @@
|
|||
|
||||
{% if not p.comment_count %}
|
||||
{% if v %}
|
||||
<script src="/assets/js/comments_v.js?v=82"></script>
|
||||
<script src="/assets/js/comments_v.js?v=83"></script>
|
||||
{% include "award_modal.html" %}
|
||||
{% include "emoji_modal.html" %}
|
||||
{% include "gif_modal.html" %}
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
|
||||
<script src="/assets/js/marked.js?v=1"></script>
|
||||
|
||||
<script src="/assets/js/submit.js?v=73"></script>
|
||||
<script src="/assets/js/submit.js?v=74"></script>
|
||||
|
||||
|
||||
{% include "emoji_modal.html" %}
|
||||
|
|
Loading…
Reference in New Issue