forked from rDrama/rDrama
master
parent
13909a52d1
commit
66d3559988
|
@ -484,27 +484,6 @@
|
||||||
linkText.textContent = 'View original';
|
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){
|
post_comment=function(fullname){
|
||||||
|
|
||||||
|
|
||||||
|
@ -1181,8 +1160,6 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include "expanded_image_modal.html" %}
|
{% include "expanded_image_modal.html" %}
|
||||||
{% include "expanded_video_modal.html" %}
|
|
||||||
{% include "expanded_video_modal2.html" %}
|
|
||||||
|
|
||||||
<script src="/assets/js/general13.js"></script>
|
<script src="/assets/js/general13.js"></script>
|
||||||
|
|
||||||
|
|
|
@ -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>
|
|
|
@ -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>
|
|
|
@ -143,8 +143,6 @@ We also have some custom hooks for mentioning users and subreddits. Note that th
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{% include "expanded_image_modal.html" %}
|
{% include "expanded_image_modal.html" %}
|
||||||
{% include "expanded_video_modal.html" %}
|
|
||||||
{% include "expanded_video_modal2.html" %}
|
|
||||||
|
|
||||||
<script src="/assets/js/general13.js"></script>
|
<script src="/assets/js/general13.js"></script>
|
||||||
|
|
||||||
|
|
|
@ -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) }}')">
|
<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">
|
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
|
||||||
</a>
|
</a>
|
||||||
{% elif p.embed_url and "youtu" in p.domain %}
|
{% 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)" class="expandable-video" data-toggle="modal" data-target="#expandVideoModal" data-url="{{p.realurl(v)}}" onclick="expandDesktopVideo('{{ p.embed_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>
|
|
||||||
{% 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) }}')">
|
|
||||||
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
|
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -409,19 +401,17 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% elif p.is_video %}
|
{% elif p.is_video %}
|
||||||
<a href="javascript:void(0)">
|
<div id="video-{{p.id}}" style="text-align: center" class="mt-4">
|
||||||
<div style="text-align: center" class="mt-4">
|
|
||||||
<video controls preload="metadata" style="max-width: 100%">
|
<video controls preload="metadata" style="max-width: 100%">
|
||||||
<source src="{{p.realurl(v)}}" type="video/mp4">
|
<source src="{{p.realurl(v)}}" type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
|
||||||
{% elif p.embed_url and "youtu" in p.domain %}
|
{% 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>
|
<iframe loading="lazy" src="{{p.embed_url}}" frameborder="0" style="max-width: 100%" width="600" height="337" allow="fullscreen"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{% elif p.url and "streamable.com/e/" in p.url %}
|
{% 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>
|
<iframe loading="lazy" src="{{p.url}}" frameborder="0" style="max-width: 100%" width="600" height="337" allow="fullscreen"></iframe>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue