added brave image+video support

This commit is contained in:
lolcat 2023-08-08 03:09:47 -04:00
parent 7c771c82c8
commit 4559857380
63 changed files with 786 additions and 307 deletions

View file

@ -360,6 +360,23 @@ if(image_class !== null){
elem.getAttribute("data-json")
);
var imagesize = elem.getElementsByTagName("img")[0];
if(imagesize.complete){
var imagesize_w = imagesize.naturalWidth;
var imagesize_h = imagesize.naturalHeight;
}
for(var i=0; i<collection.length; i++){
if(collection[i].width === null){
collection[i].width = imagesize_w;
collection[i].height = imagesize_h;
}
}
var title = elem.title;
}