forked from MarseyWorld/MarseyWorld
fds
parent
7fbde73d17
commit
dd726be4c9
|
@ -229,7 +229,7 @@ def sanitize(sanitized, noimages=False):
|
|||
|
||||
sanitized = sanitized.replace(replacing, htmlsource)
|
||||
for i in re.finditer('<p>(https:.*?\.mp4)</p>', sanitized):
|
||||
sanitized = sanitized.replace(i.group(0), f'<p><video controls preload="metadata" class="embedvid"><source src="{i.group(1)}" type="video/mp4"></video>')
|
||||
sanitized = sanitized.replace(i.group(0), f'<p><video controls preload="none" class="embedvid"><source src="{i.group(1)}" type="video/mp4"></video>')
|
||||
|
||||
for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]:
|
||||
sanitized = sanitized.replace(rd, "https://old.reddit.com/")
|
||||
|
|
|
@ -59,7 +59,7 @@ You can use Markdown formatting.
|
|||
<tr>
|
||||
<td>Videos</td>
|
||||
<td>[{{'SITE_NAME' | app_config}}]({{request.host_url}})</td>
|
||||
<td><video controls preload="metadata" class="embedvid"><source src="https://files.catbox.moe/v4om92.mp4" type="video/mp4"></video></td>
|
||||
<td><video controls preload="none" class="embedvid"><source src="https://files.catbox.moe/v4om92.mp4" type="video/mp4"></video></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
|
|
@ -454,7 +454,7 @@
|
|||
{% elif p.url and p.url.lower().endswith('.mp4') %}
|
||||
<div class="row no-gutters">
|
||||
<div class="col">
|
||||
<video controls preload="metadata" class="embedvid">
|
||||
<video controls preload="none" class="embedvid">
|
||||
<source src="{{p.realurl(v)}}" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
|
|
@ -487,7 +487,7 @@
|
|||
|
||||
{% if p.url and p.url.lower().endswith('.mp4') %}
|
||||
<div id="video-{{p.id}}" style="text-align: center" class="{% if p.over_18 or not ((v and v.cardview) or (not v and environ.get('CARD_VIEW') == '1')) %}d-none{% endif %} mt-4">
|
||||
<video controls preload="metadata" class="embedvid">
|
||||
<video controls preload="none" class="embedvid">
|
||||
<source src="{{p.realurl(v)}}" type="video/mp4">
|
||||
</video>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue