remotes/1693045480750635534/spooky-22
Aevann1 2021-12-08 00:40:13 +02:00
parent c4182256e8
commit 1ad1d61cca
4 changed files with 6 additions and 12 deletions

View File

@ -698,10 +698,8 @@ def submit_post(v):
for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]:
url = url.replace(rd, "https://old.reddit.com/")
url = url.replace("old.reddit.com/gallery", "new.reddit.com/gallery")
url = url.replace("https://mobile.twitter.com", "https://twitter.com").replace("https://m.facebook", "https://facebook").replace("https://m.wikipedia", "https://wikipedia").replace("https://m.youtube", "https://youtube")
url = url.replace("old.reddit.com/gallery", "new.reddit.com/gallery").replace("https://youtu.be/", "https://youtube.com/watch?v=").replace("https://music.youtube.com/watch?v=", "https://youtube.com/watch?v=").replace("https://open.spotify.com/", "https://open.spotify.com/embed/").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("https://m.wikipedia", "https://wikipedia").replace("https://m.youtube", "https://youtube")
if url.startswith("https://streamable.com/") and not url.startswith("https://streamable.com/e/"): url = url.replace("https://streamable.com/", "https://streamable.com/e/")

View File

@ -3,10 +3,6 @@
{% block desktopBanner %}
{% if v %}
{% if v.agendaposter %}
<iframe width="0" height="0" src="https://www.youtube.com/embed/A2o15RCtSS0?rel=0&amp;controls=0&amp;showinfo=0&autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
{% endif %}
{% if not v.fp %}
<script>
function fp(fp) {

View File

@ -415,10 +415,10 @@
<div id="post-body" class="post-body mt-3">
{% if p.realurl(v) %}
{% if "streamable.com/" in p.realurl(v) %}
{% if p.url.startswith('https://streamable.com/e/') %}
<div style="width: 100%; height: 0px; position: relative; padding-bottom: 56.250%;"><iframe loading="lazy" src="{{p.realurl(v)}}" frameborder="0" width="100%" height="100%" allowfullscreen="" style="width: 100%; height: 100%; position: absolute;"></iframe></div>
<pre></pre>
{% elif "spotify.com/" in p.realurl(v) %}
{% elif p.domain == 'open.spotify.com' %}
{% if "spotify.com/embed/" in p.realurl(v) %}
{% set streamurl=p.realurl(v) %}
{% else %}
@ -483,7 +483,7 @@
<script src="/assets/js/twitter.js?v=1"></script>
{% endif %}
<script>document.getElementById('twitter-widget-0').setAttribute('sandbox','')</script>
{% elif "youtu" in p.domain %}
{% elif p.domain in ['youtu.be','youtube.com'] %}
{% if 'lite' in p.embed_url %}
{{p.embed_url | safe}}
{% else %}

View File

@ -491,7 +491,7 @@
<source src="{{p.realurl(v)}}" type="video/mp4">
</video>
</div>
{% elif p.embed_url and "youtu" in p.domain %}
{% elif p.embed_url and p.domain in ['youtu.be','youtube.com'] %}
<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-3 mb-4">
{% if 'lite' in p.embed_url %}
{{p.embed_url | safe}}
@ -499,7 +499,7 @@
<iframe loading="lazy" src="{{p.embed_url}}" frameborder="0" style="max-width:100%;max-height:20rem" width="600" height="337" allow="fullscreen"></iframe>
{% endif %}
</div>
{% elif p.url and "streamable.com/e/" in p.url %}
{% elif p.url and p.url.startswith('https://streamable.com/e/') %}
<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-3 mb-4">
<iframe loading="lazy" src="{{p.url}}" frameborder="0" style="max-width:100%;max-height:20rem" width="600" height="337" allow="fullscreen"></iframe>
</div>