angelts commited on
Commit
323f2bb
·
verified ·
1 Parent(s): b2c76a9

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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('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;
 
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;