Update
This commit is contained in:
parent
70613257e2
commit
8f5cc744cc
|
@ -67,7 +67,7 @@ if(query == "/mastodon") {
|
||||||
value.forEach(obj1 => {
|
value.forEach(obj1 => {
|
||||||
Object.entries(obj1).forEach(([k, v]) => {
|
Object.entries(obj1).forEach(([k, v]) => {
|
||||||
if(k == "preview_url") {
|
if(k == "preview_url") {
|
||||||
media_link += `<img src="${v}" class="fullscreen" onclick="showFullscreenImage(this);">`;
|
media_link += `<img src="${v}" full_src="${obj1.url}" class="fullscreen" onclick="showFullscreenImage(this);">`;
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,7 +14,12 @@ function openInNewTab(url) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function showFullscreenImage(element) {
|
function showFullscreenImage(element) {
|
||||||
imageSrc = element.getAttribute('src');
|
if (element.hasAttribute('full_src')) {
|
||||||
|
imageSrc = element.getAttribute('full_src');
|
||||||
|
} else {
|
||||||
|
imageSrc = element.getAttribute('src');
|
||||||
|
}
|
||||||
|
|
||||||
imageAlt = element.getAttribute('alt');
|
imageAlt = element.getAttribute('alt');
|
||||||
|
|
||||||
myModalImg = document.getElementById('myModalImg');
|
myModalImg = document.getElementById('myModalImg');
|
||||||
|
|
Loading…
Reference in New Issue