forked from MarseyWorld/MarseyWorld
fsddfssfd
parent
c913516ec4
commit
99c560fb19
|
@ -172,16 +172,16 @@ def sanitize(sanitized, noimages=False):
|
||||||
for i in re.finditer('(?<!"):([!#A-Za-z0-9]{1,30}?):', new):
|
for i in re.finditer('(?<!"):([!#A-Za-z0-9]{1,30}?):', new):
|
||||||
emoji = i.group(1).lower()
|
emoji = i.group(1).lower()
|
||||||
if emoji.startswith("#!") or emoji.startswith("!#"):
|
if emoji.startswith("#!") or emoji.startswith("!#"):
|
||||||
classes = 'class="mirrored" '
|
classes = 'class="emj mirrored" '
|
||||||
remoji = emoji[2:]
|
remoji = emoji[2:]
|
||||||
elif emoji.startswith("!"):
|
elif emoji.startswith("!"):
|
||||||
classes = 'height=60 class="mirrored" '
|
classes = 'height=60 class="emj mirrored" '
|
||||||
remoji = emoji[1:]
|
remoji = emoji[1:]
|
||||||
elif emoji.startswith("#"):
|
elif emoji.startswith("#"):
|
||||||
classes = ""
|
classes = 'class="emj" '
|
||||||
remoji = emoji[1:]
|
remoji = emoji[1:]
|
||||||
else:
|
else:
|
||||||
classes = 'height=60 '
|
classes = 'height=60 class="emj" '
|
||||||
remoji = emoji
|
remoji = emoji
|
||||||
|
|
||||||
if path.isfile(f'./files/assets/images/emojis/{remoji}.webp'):
|
if path.isfile(f'./files/assets/images/emojis/{remoji}.webp'):
|
||||||
|
@ -198,13 +198,13 @@ def sanitize(sanitized, noimages=False):
|
||||||
if emoji.startswith("!"):
|
if emoji.startswith("!"):
|
||||||
emoji = emoji[1:]
|
emoji = emoji[1:]
|
||||||
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
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
|
if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1
|
||||||
else: session["favorite_emojis"][emoji] = 1
|
else: session["favorite_emojis"][emoji] = 1
|
||||||
|
|
||||||
elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
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
|
if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1
|
||||||
else: session["favorite_emojis"][emoji] = 1
|
else: session["favorite_emojis"][emoji] = 1
|
||||||
|
@ -252,10 +252,10 @@ def filter_emojis_only(title):
|
||||||
if emoji.startswith("!"):
|
if emoji.startswith("!"):
|
||||||
emoji = emoji[1:]
|
emoji = emoji[1:]
|
||||||
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
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'):
|
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)
|
if len(title) > 1500: abort(400)
|
||||||
else: return title
|
else: return title
|
|
@ -749,7 +749,7 @@
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
<script src="/assets/js/marked.js?v=1"></script>
|
<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 %}
|
{% endif %}
|
||||||
|
|
||||||
<script src="/assets/js/clipboard.js?v=1"></script>
|
<script src="/assets/js/clipboard.js?v=1"></script>
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-touch-fullscreen" content="yes">
|
<meta name="apple-touch-fullscreen" content="yes">
|
||||||
<meta name="format-detection" content="telephone=no">
|
<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="apple-touch-icon" sizes="180x180" href="/assets/images/{{'SITE_NAME' | app_config}}/icon.webp?v=4">
|
||||||
<link rel="manifest" href="/assets/manifest.json">
|
<link rel="manifest" href="/assets/manifest.json">
|
||||||
|
|
|
@ -65,22 +65,22 @@ You can use Markdown formatting.
|
||||||
<tr>
|
<tr>
|
||||||
<td>Emojis</td>
|
<td>Emojis</td>
|
||||||
<td>:marseylove:</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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Mirrored Emojis</td>
|
<td>Mirrored Emojis</td>
|
||||||
<td>:!marseylove:</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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Large Emojis</td>
|
<td>Large Emojis</td>
|
||||||
<td>:#marseylove:</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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Large Mirroed Emojis</td>
|
<td>Large Mirroed Emojis</td>
|
||||||
<td>:#!marseylove:</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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Poll Options</td>
|
<td>Poll Options</td>
|
||||||
|
|
|
@ -870,7 +870,7 @@
|
||||||
|
|
||||||
{% if not p.comment_count %}
|
{% if not p.comment_count %}
|
||||||
{% if v %}
|
{% 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 "award_modal.html" %}
|
||||||
{% include "emoji_modal.html" %}
|
{% include "emoji_modal.html" %}
|
||||||
{% include "gif_modal.html" %}
|
{% include "gif_modal.html" %}
|
||||||
|
|
|
@ -175,7 +175,7 @@
|
||||||
|
|
||||||
<script src="/assets/js/marked.js?v=1"></script>
|
<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" %}
|
{% include "emoji_modal.html" %}
|
||||||
|
|
Loading…
Reference in New Issue