Upload app.py
Browse files
app.py
CHANGED
|
@@ -213,10 +213,10 @@ js +="""
|
|
| 213 |
//<div role="tabpanel" id="" class="tabitem svelte-dmtrd3" style="display: none;">
|
| 214 |
let visibleImage = null;
|
| 215 |
// const images = document.querySelectorAll('div.gallery-container span.preview button.media-button img' + 'div.image-container button div.image-frame img');
|
| 216 |
-
const images = document.querySelectorAll(
|
| 217 |
for (const img of images) {
|
| 218 |
const style = window.getComputedStyle(img);
|
| 219 |
-
if ( style.display !== "none" && style.visibility !== "hidden" &&
|
| 220 |
{
|
| 221 |
visibleImage = img;
|
| 222 |
break;
|
|
|
|
| 213 |
//<div role="tabpanel" id="" class="tabitem svelte-dmtrd3" style="display: none;">
|
| 214 |
let visibleImage = null;
|
| 215 |
// const images = document.querySelectorAll('div.gallery-container span.preview button.media-button img' + 'div.image-container button div.image-frame img');
|
| 216 |
+
const images = document.querySelectorAll("div.image-container button div.image-frame img, div.image-container button div.image-frame img");
|
| 217 |
for (const img of images) {
|
| 218 |
const style = window.getComputedStyle(img);
|
| 219 |
+
if ( style.display !== "none" && style.visibility !== "hidden" && img.offsetWidth > 0 && img.offsetHeight > 0 )
|
| 220 |
{
|
| 221 |
visibleImage = img;
|
| 222 |
break;
|