diff options
author | lolcat <will@lolcat.ca> | 2023-08-08 03:09:47 -0400 |
---|---|---|
committer | lolcat <will@lolcat.ca> | 2023-08-08 03:09:47 -0400 |
commit | 4559857380317d768ff8394db711eb5c894aa1f8 (patch) | |
tree | 2ed555b5ba104297642893ef5511d1d28f282842 /static/client.js | |
parent | 7c771c82c8e03b337f9f03ae2d4afc25d3f0faca (diff) |
added brave image+video support
Diffstat (limited to 'static/client.js')
-rw-r--r-- | static/client.js | 17 |
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; } |