remotes/1693045480750635534/spooky-22
Aevann1 2021-09-07 02:43:52 +02:00
parent 13909a52d1
commit 66d3559988
6 changed files with 15 additions and 82 deletions

View File

@ -484,27 +484,6 @@
linkText.textContent = 'View original';
};
// Expand Videos on Desktop
function expandDesktopVideo(video, link) {
var linkText = document.getElementById("desktop-expanded-video-link");
var inlineVideo = document.getElementById("desktop-expanded-video");
inlineVideo.src = video;
linkText.href = video;
linkText.textContent = 'View original';
};
function expandDesktopVideo2(video, link) {
var inlineVideo = document.getElementById("desktop-expanded-video2");
inlineVideo.innerHTML = `<video controls="" preload="metadata" style="max-width: 100%"><source src="${video}" type="video/mp4"></video>`;
};
post_comment=function(fullname){
@ -1181,8 +1160,6 @@
{% endif %}
{% include "expanded_image_modal.html" %}
{% include "expanded_video_modal.html" %}
{% include "expanded_video_modal2.html" %}
<script src="/assets/js/general13.js"></script>

View File

@ -1,18 +0,0 @@
<!-- Expand Desktop Video Modal -->
<div class="modal desktop-expanded-video-modal" id="expandVideoModal" tabindex="-1" role="dialog" aria-labelledby="expandVideoModalTitle" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-centered mx-auto" role="document" style="width: fit-content;">
<div class="modal-content bg-transparent shadow-none m-5 m-md-0">
<div class="modal-body text-center p-0">
<div class="d-inline-block position-relative">
<iframe loading="lazy" src="" id="desktop-expanded-video" style="max-width: 100%" frameborder="0" width="600" height="337" allow="fullscreen"></iframe>
<div class="position-absolute d-flex justify-content-between align-items-center w-100 mt-1">
<a href="" rel="nofollow noopener noreferrer" target="_blank" class="text-gray-500 font-weight-bold text-left" id="desktop-expanded-video-link">View original</a>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,14 +0,0 @@
<!-- Expand Desktop Video Modal -->
<div class="modal desktop-expanded-video-modal" id="expandVideoModal2" tabindex="-1" role="dialog" aria-labelledby="expandVideoModalTitle" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-centered mx-auto" role="document" style="width: fit-content;">
<div class="modal-content bg-transparent shadow-none m-5 m-md-0">
<div class="modal-body text-center p-0">
<div class="d-inline-block position-relative" id="desktop-expanded-video2">
</div>
</div>
</div>
</div>
</div>

View File

@ -143,8 +143,6 @@ We also have some custom hooks for mentioning users and subreddits. Note that th
</table>
{% include "expanded_image_modal.html" %}
{% include "expanded_video_modal.html" %}
{% include "expanded_video_modal2.html" %}
<script src="/assets/js/general13.js"></script>

View File

@ -311,12 +311,12 @@
<pre></pre>
{% elif not p.embed_url and not p.is_image and not p.is_video %}
<a rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>
<div class="d-flex d-md-none justify-content-between align-items-center border rounded p-2{% if p.realbody(v) %} mb-3{% endif %}">
<span>{{p.domain|truncate(30, True)}}</span>
<i class="fas fa-external-link-alt text-small"></i>
</div>
</a>
<a rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}" {% if not v or v.newtabexternal %}target="_blank"{% endif %}>
<div class="d-flex d-md-none justify-content-between align-items-center border rounded p-2{% if p.realbody(v) %} mb-3{% endif %}">
<span>{{p.domain|truncate(30, True)}}</span>
<i class="fas fa-external-link-alt text-small"></i>
</div>
</a>
{% endif %}
{% endif %}

View File

@ -72,16 +72,8 @@
<a href="javascript:void(0)" class="expandable-image" data-toggle="modal" data-target="#expandImageModal" data-url="{{p.realurl(v)}}" onclick="expandDesktopImage('{{ p.realurl(v) }}')">
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a>
{% elif p.embed_url and "youtu" in p.domain %}
<a href="javascript:void(0)" class="expandable-video" data-toggle="modal" data-target="#expandVideoModal" data-url="{{p.realurl(v)}}" onclick="expandDesktopVideo('{{ p.embed_url }}')">
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a>
{% elif p.url and "streamable.com/e/" in p.url %}
<a href="javascript:void(0)" class="expandable-video" data-toggle="modal" data-target="#expandVideoModal" data-url="{{p.realurl(v)}}" onclick="expandDesktopVideo('{{ p.realurl(v) }}')">
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a>
{% elif p.is_video %}
<a href="javascript:void(0)" class="expandable-video" data-toggle="modal" data-target="#expandVideoModal2" data-url="{{p.realurl(v)}}" onclick="expandDesktopVideo2('{{ p.realurl(v) }}')">
{% elif p.is_video or (p.embed_url and "youtu" in p.domain) or (p.url and "streamable.com/e/" in p.url) %}
<a href="javascript:void(0)" onclick="document.getElementById('video-{{p.id}}').classList.toggle('d-none')">
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
</a>
{% else %}
@ -409,19 +401,17 @@
</a>
</div>
{% elif p.is_video %}
<a href="javascript:void(0)">
<div style="text-align: center" class="mt-4">
<video controls preload="metadata" style="max-width: 100%">
<source src="{{p.realurl(v)}}" type="video/mp4">
</video>
</div>
</a>
<div id="video-{{p.id}}" style="text-align: center" class="mt-4">
<video controls preload="metadata" style="max-width: 100%">
<source src="{{p.realurl(v)}}" type="video/mp4">
</video>
</div>
{% elif p.embed_url and "youtu" in p.domain %}
<div style="text-align: center" class="mt-3 mb-4">
<div id="video-{{p.id}}" style="text-align: center" class="mt-3 mb-4">
<iframe loading="lazy" src="{{p.embed_url}}" frameborder="0" style="max-width: 100%" width="600" height="337" allow="fullscreen"></iframe>
</div>
{% elif p.url and "streamable.com/e/" in p.url %}
<div style="text-align: center" class="mt-3 mb-4">
<div id="video-{{p.id}}" style="text-align: center" class="mt-3 mb-4">
<iframe loading="lazy" src="{{p.url}}" frameborder="0" style="max-width: 100%" width="600" height="337" allow="fullscreen"></iframe>
</div>
{% endif %}