forked from MarseyWorld/MarseyWorld
delay
parent
10269229bd
commit
00725d40e0
|
@ -227,7 +227,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
|
|||
if remoji == 'marseyrandom': remoji = choice(marseys)
|
||||
|
||||
if path.isfile(f'files/assets/images/emojis/{remoji}.webp'):
|
||||
new = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" class="{classes}" src="/static/assets/images/emojis/{remoji}.webp" >', new, flags=re.I)
|
||||
new = re.sub(f'(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" class="{classes}" src="/static/assets/images/emojis/{remoji}.webp" >', new, flags=re.I)
|
||||
if comment: marseys_used.add(emoji)
|
||||
|
||||
sanitized = sanitized.replace(old, new)
|
||||
|
@ -251,7 +251,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
|
|||
else: emoji = old
|
||||
|
||||
if path.isfile(f'files/assets/images/emojis/{emoji}.webp'):
|
||||
sanitized = re.sub(f'(?<!"):{i.group(1).lower()}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{old}:" title=":!{old}:" delay="0" class="{classes}" src="/static/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
|
||||
sanitized = re.sub(f'(?<!"):{i.group(1).lower()}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{old}:" title=":!{old}:" class="{classes}" src="/static/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
|
||||
if comment: marseys_used.add(emoji)
|
||||
else:
|
||||
classes = 'emoji'
|
||||
|
@ -262,7 +262,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False):
|
|||
else: emoji = old
|
||||
|
||||
if path.isfile(f'files/assets/images/emojis/{emoji}.webp'):
|
||||
sanitized = re.sub(f'(?<!"):{i.group(1).lower()}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{old}:" title=":{old}:" delay="0" class="{classes}" src="/static/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
|
||||
sanitized = re.sub(f'(?<!"):{i.group(1).lower()}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{old}:" title=":{old}:" class="{classes}" src="/static/assets/images/emojis/{emoji}.webp">', sanitized, flags=re.I)
|
||||
if comment: marseys_used.add(emoji)
|
||||
|
||||
sanitized = sanitized.replace("https://youtu.be/", "https://youtube.com/watch?v=").replace("https://music.youtube.com/watch?v=", "https://youtube.com/watch?v=").replace("https://streamable.com/", "https://streamable.com/e/").replace("https://youtube.com/shorts/", "https://youtube.com/watch?v=").replace("https://mobile.twitter", "https://twitter").replace("https://m.facebook", "https://facebook").replace("m.wikipedia.org", "wikipedia.org").replace("https://m.youtube", "https://youtube").replace("https://www.youtube", "https://youtube")
|
||||
|
@ -339,7 +339,7 @@ def filter_emojis_only(title, edit=False, graceful=False):
|
|||
else: emoji = old
|
||||
|
||||
if path.isfile(f'files/assets/images/emojis/{emoji}.webp'):
|
||||
title = re.sub(f'(?<!"):!{old}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{old}:" title=":!{old}:" delay="0" src="/static/assets/images/emojis/{emoji}.webp" class="{classes}">', title, flags=re.I)
|
||||
title = re.sub(f'(?<!"):!{old}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":!{old}:" title=":!{old}:" src="/static/assets/images/emojis/{emoji}.webp" class="{classes}">', title, flags=re.I)
|
||||
|
||||
else:
|
||||
classes = 'emoji'
|
||||
|
@ -350,7 +350,7 @@ def filter_emojis_only(title, edit=False, graceful=False):
|
|||
else: emoji = old
|
||||
|
||||
if path.isfile(f'files/assets/images/emojis/{emoji}.webp'):
|
||||
title = re.sub(f'(?<!"):{old}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{old}:" title=":{old}:" delay="0" class="{classes}" src="/static/assets/images/emojis/{emoji}.webp">', title, flags=re.I)
|
||||
title = re.sub(f'(?<!"):{old}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{old}:" title=":{old}:" class="{classes}" src="/static/assets/images/emojis/{emoji}.webp">', title, flags=re.I)
|
||||
|
||||
title = re.sub('~~(.*?)~~', r'<del>\1</del>', title)
|
||||
|
||||
|
|
|
@ -69,22 +69,22 @@ You can use Markdown formatting:
|
|||
<tr>
|
||||
<td>Emojis</td>
|
||||
<td>:marseylove:</td>
|
||||
<td><img loading="lazy" data-bs-toggle="tooltip" class="emoji" alt=":marseylove:" title=":marseylove:" data-bs-original-title=":marseylove:" delay="0" height="30" src="/static/assets/images/emojis/marseylove.webp?a=1008"></td>
|
||||
<td><img loading="lazy" data-bs-toggle="tooltip" class="emoji" alt=":marseylove:" title=":marseylove:" data-bs-original-title=":marseylove:" height="30" src="/static/assets/images/emojis/marseylove.webp?a=1008"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mirrored Emojis</td>
|
||||
<td>:!marseylove:</td>
|
||||
<td><img loading="lazy" data-bs-toggle="tooltip" class="emoji mirrored" alt=":!marseylove:" title=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" height="30" src="/static/assets/images/emojis/marseylove.webp?a=1008"></td>
|
||||
<td><img loading="lazy" data-bs-toggle="tooltip" class="emoji mirrored" alt=":!marseylove:" title=":!marseylove:" data-bs-original-title=":!marseylove:" height="30" src="/static/assets/images/emojis/marseylove.webp?a=1008"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Large Emojis</td>
|
||||
<td>:#marseylove:</td>
|
||||
<td><img loading="lazy" data-bs-toggle="tooltip" class="emoji-lg" alt=":!marseylove:" title=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" src="/static/assets/images/emojis/marseylove.webp?a=1008"></td>
|
||||
<td><img loading="lazy" data-bs-toggle="tooltip" class="emoji-lg" alt=":!marseylove:" title=":!marseylove:" data-bs-original-title=":!marseylove:" src="/static/assets/images/emojis/marseylove.webp?a=1008"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Large Mirrored Emojis</td>
|
||||
<td>:#!marseylove:</td>
|
||||
<td><img loading="lazy" data-bs-toggle="tooltip" class="emoji-lg mirrored" alt=":!marseylove:" title=":!marseylove:" data-bs-original-title=":!marseylove:" delay="0" src="/static/assets/images/emojis/marseylove.webp?a=1008"></td>
|
||||
<td><img loading="lazy" data-bs-toggle="tooltip" class="emoji-lg mirrored" alt=":!marseylove:" title=":!marseylove:" data-bs-original-title=":!marseylove:" src="/static/assets/images/emojis/marseylove.webp?a=1008"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Random Marsey</td>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<tr>
|
||||
<td>{{loop.index}}</td>
|
||||
<td>{{marsey.name}}</td>
|
||||
<td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":{{marsey.name}}:" title=":{{marsey.name}}:" data-bs-original-title=":{{marsey.name}}:" delay="0" src="/static/assets/images/emojis/{{marsey.name}}.webp?a=1010" ></td>
|
||||
<td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":{{marsey.name}}:" title=":{{marsey.name}}:" data-bs-original-title=":{{marsey.name}}:" src="/static/assets/images/emojis/{{marsey.name}}.webp?a=1010" ></td>
|
||||
<td>{{marsey.count}}</td>
|
||||
<td><a style="color:#{{author.namecolor}};font-weight:bold" href="/@{{author.username}}"><img loading="lazy" src="{{author.profile_url}}" class="pp20"><span {% if author.patron %}class="patron" style="background-color:#{{author.namecolor}}"{% endif %}>{{author.username}}</span></a></td>
|
||||
</tr>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<tr>
|
||||
<td>{{loop.index}}</td>
|
||||
<td>{{marsey.name}}</td>
|
||||
<td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":{{marsey.name}}:" title=":{{marsey.name}}:" data-bs-original-title=":{{marsey.name}}:" delay="0" src="/static/assets/images/emojis/{{marsey.name}}.webp?a=1010" ></td>
|
||||
<td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":{{marsey.name}}:" title=":{{marsey.name}}:" data-bs-original-title=":{{marsey.name}}:" src="/static/assets/images/emojis/{{marsey.name}}.webp?a=1010" ></td>
|
||||
<td>{{marsey.count}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue