remotes/1693045480750635534/spooky-22
Aevann1 2021-09-07 00:39:28 +02:00
parent 6eabc53edf
commit cf3d6a9beb
3 changed files with 29 additions and 5 deletions

View File

@ -484,6 +484,25 @@
linkText.textContent = 'View original';
};
// Expand Videos on Desktop
function expandDesktopVideo(video, link) {
// Link text
var linkText = document.getElementById("desktop-expanded-video-link");
var videoLink = document.getElementById("desktop-expanded-video-wrap-link");
var inlineVideo = document.getElementById("desktop-expanded-video");
inlineVideo.src = video.replace("100w.gif", "giphy.gif");
linkText.href = video;
videoLink.href=video;
linkText.textContent = 'View original';
};
post_comment=function(fullname){

View File

@ -1,13 +1,13 @@
<!-- Expand Desktop Video Modal -->
<div class="modal desktop-expanded-image-modal" id="expandVideoModal" tabindex="-1" role="dialog" aria-labelledby="expandVideoModalTitle" aria-hidden="true">
<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">
<a href="" rel="nofollow noopener noreferrer" target="_blank" id="desktop-expanded-video-wrap-link">
<iframe src="" frameborder="0" class="img-fluid rounded" id="desktop-expanded-video" style="min-width:250px;"></iframe>
<iframe src="" frameborder="0" width="600" height="337" allow="fullscreen"></iframe>
</a>
<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>
@ -18,6 +18,3 @@
</div>
</div>
</div>
<div style="padding-top:5px; padding-bottom: 10px;"></div>

View File

@ -72,6 +72,14 @@
<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.realurl(v) }}')">
<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 not p.is_video %}
<a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}">
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">