make image popups work again for embeds
This commit is contained in:
parent
3ee271a345
commit
9a6ea8fc6d
1 changed files with 13 additions and 4 deletions
|
@ -173,9 +173,18 @@ class Embed {
|
|||
generateImage() {
|
||||
const img = createImg(this.json.thumbnail.proxy_url);
|
||||
img.classList.add("messageimg");
|
||||
img.onclick = function () {
|
||||
img.onclick = () => {
|
||||
const full = new ImagesDisplay([
|
||||
new File({id: "", filename: "", url: img.src, size: -1, content_type: "image"}, null),
|
||||
new File(
|
||||
{
|
||||
id: "",
|
||||
filename: "",
|
||||
url: this.json.thumbnail.proxy_url,
|
||||
size: -1,
|
||||
content_type: "image/",
|
||||
},
|
||||
null,
|
||||
),
|
||||
]);
|
||||
full.show();
|
||||
};
|
||||
|
@ -212,7 +221,7 @@ class Embed {
|
|||
img.classList.add("embedimg");
|
||||
img.onclick = function () {
|
||||
const full = new ImagesDisplay([
|
||||
new File({id: "", filename: "", url: img.src, size: -1, content_type: "image"}, null),
|
||||
new File({id: "", filename: "", url: img.src, size: -1, content_type: "image/"}, null),
|
||||
]);
|
||||
full.show();
|
||||
};
|
||||
|
@ -390,7 +399,7 @@ class Embed {
|
|||
} else {
|
||||
img.onclick = async () => {
|
||||
const full = new ImagesDisplay([
|
||||
new File({id: "", filename: "", url: img.src, size: -1, content_type: "image"}, null),
|
||||
new File({id: "", filename: "", url: img.src, size: -1, content_type: "image/"}, null),
|
||||
]);
|
||||
full.show();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue