forked from rDrama/rDrama
sfdsdf
parent
b247448915
commit
24426c6cbc
|
@ -1,19 +1,4 @@
|
||||||
<script>
|
<script>
|
||||||
for(let el of document.getElementsByClassName('expandable-image')) {
|
|
||||||
el.onclick = function(event) {
|
|
||||||
|
|
||||||
if (event.which != 1) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
let source = (event.target || event.srcElement).parentNode;
|
|
||||||
var url= source.dataset.bsUrl;
|
|
||||||
|
|
||||||
expandDesktopImage(url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function expandDesktopImage(image) {
|
function expandDesktopImage(image) {
|
||||||
|
|
||||||
var linkText = document.getElementById("desktop-expanded-image-link");
|
var linkText = document.getElementById("desktop-expanded-image-link");
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
|
<img loading="lazy" src="{{p.thumb_url}}" class="post-img">
|
||||||
</a>
|
</a>
|
||||||
{% elif p.is_image %}
|
{% elif p.is_image %}
|
||||||
<a href="javascript:void(0)" class="expandable-image" data-bs-toggle="modal" data-bs-target="#expandImageModal" data-bs-url="{{p.realurl(v)}}" onclick="expandDesktopImage('{{ p.realurl(v) }}')">
|
<a href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#expandImageModal" data-bs-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.is_video or (p.embed_url and "youtu" in p.domain) or (p.url and "streamable.com/e/" in p.url) %}
|
{% elif p.is_video or (p.embed_url and "youtu" in p.domain) or (p.url and "streamable.com/e/" in p.url) %}
|
||||||
|
|
Loading…
Reference in New Issue