summaryrefslogtreecommitdiff
path: root/static/client.js
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2023-08-08 03:09:47 -0400
committerlolcat <will@lolcat.ca>2023-08-08 03:09:47 -0400
commit4559857380317d768ff8394db711eb5c894aa1f8 (patch)
tree2ed555b5ba104297642893ef5511d1d28f282842 /static/client.js
parent7c771c82c8e03b337f9f03ae2d4afc25d3f0faca (diff)
added brave image+video support
Diffstat (limited to 'static/client.js')
-rw-r--r--static/client.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/static/client.js b/static/client.js
index 545f0bc..89e9a5e 100644
--- a/static/client.js
+++ b/static/client.js
@@ -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;
}