fsddfssfd

master
Aevann1 2021-12-08 20:44:37 +02:00
parent c913516ec4
commit 99c560fb19
6 changed files with 16 additions and 16 deletions

View File

@ -172,16 +172,16 @@ def sanitize(sanitized, noimages=False):
for i in re.finditer('(?<!"):([!#A-Za-z0-9]{1,30}?):', new):
emoji = i.group(1).lower()
if emoji.startswith("#!") or emoji.startswith("!#"):
classes = 'class="mirrored" '
classes = 'class="emj mirrored" '
remoji = emoji[2:]
elif emoji.startswith("!"):
classes = 'height=60 class="mirrored" '
classes = 'height=60 class="emj mirrored" '
remoji = emoji[1:]
elif emoji.startswith("#"):
classes = ""
classes = 'class="emj" '
remoji = emoji[1:]
else:
classes = 'height=60 '
classes = 'height=60 class="emj" '
remoji = emoji
if path.isfile(f'./files/assets/images/emojis/{remoji}.webp'):
@ -198,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" height=30 class="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="emj 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" height=30 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="emj" 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
@ -252,10 +252,10 @@ def filter_emojis_only(title):
if emoji.startswith("!"):
emoji = emoji[1:]
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
title = 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" class="mirrored">', title)
title = 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" class="emj mirrored">', title)
elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
title = 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">', title)
title = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=30 class="emj" src="https://{site}/assets/images/emojis/{emoji}.webp">', title)
if len(title) > 1500: abort(400)
else: return title

View File

@ -749,7 +749,7 @@
{% if v %}
<script src="/assets/js/marked.js?v=1"></script>
<script src="/assets/js/comments_v.js?v=84"></script>
<script src="/assets/js/comments_v.js?v=85"></script>
{% endif %}
<script src="/assets/js/clipboard.js?v=1"></script>

View File

@ -45,7 +45,7 @@
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/images/{{'SITE_NAME' | app_config}}/icon.webp?v=4">
<link rel="manifest" href="/assets/manifest.json">

View File

@ -65,22 +65,22 @@ You can use Markdown formatting.
<tr>
<td>Emojis</td>
<td>:marseylove:</td>
<td><img loading="lazy" data-bs-toggle="tooltip" alt=":marseylove:" data-bs-original-title=":marseylove:" delay="0" height="30" src="/assets/images/emojis/marseylove.webp?v=1"></td>
<td><img loading="lazy" data-bs-toggle="tooltip" class="emj" alt=":marseylove:" data-bs-original-title=":marseylove:" delay="0" height="30" src="/assets/images/emojis/marseylove.webp?v=1"></td>
</tr>
<tr>
<td>Mirrored Emojis</td>
<td>:!marseylove:</td>
<td><img loading="lazy" data-bs-toggle="tooltip" class="mirrored" alt=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" height="30" src="/assets/images/emojis/marseylove.webp?v=1"></td>
<td><img loading="lazy" data-bs-toggle="tooltip" class="emj mirrored" alt=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" height="30" src="/assets/images/emojis/marseylove.webp?v=1"></td>
</tr>
<tr>
<td>Large Emojis</td>
<td>:#marseylove:</td>
<td><img loading="lazy" data-bs-toggle="tooltip" alt=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" src="/assets/images/emojis/marseylove.webp?v=1"></td>
<td><img loading="lazy" data-bs-toggle="tooltip" class="emj" alt=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" src="/assets/images/emojis/marseylove.webp?v=1"></td>
</tr>
<tr>
<td>Large Mirroed Emojis</td>
<td>:#!marseylove:</td>
<td><img loading="lazy" data-bs-toggle="tooltip" class="mirrored" alt=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" src="/assets/images/emojis/marseylove.webp?v=1"></td>
<td><img loading="lazy" data-bs-toggle="tooltip" class="emj mirrored" alt=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" src="/assets/images/emojis/marseylove.webp?v=1"></td>
</tr>
<tr>
<td>Poll Options</td>

View File

@ -870,7 +870,7 @@
{% if not p.comment_count %}
{% if v %}
<script src="/assets/js/comments_v.js?v=84"></script>
<script src="/assets/js/comments_v.js?v=85"></script>
{% include "award_modal.html" %}
{% include "emoji_modal.html" %}
{% include "gif_modal.html" %}

View File

@ -175,7 +175,7 @@
<script src="/assets/js/marked.js?v=1"></script>
<script src="/assets/js/submit.js?v=75"></script>
<script src="/assets/js/submit.js?v=76"></script>
{% include "emoji_modal.html" %}