Open waldyrious opened 2 years ago
It seems that the issue is that there's an <input type=password>
in the DOM, although it's not visible in the page.
To fix this, according to this SO answer, we would need to use something like:
pwd=document.querySelector("input[type='password']")
pwd.offsetParent === null
Note: window.getComputedStyle(pwd)
could work in some cases, but in the case of continente.pt, the display
property is set to "block", and visibility
is set to "visible".
Hm, turns out I'm getting false positives with the offsetParent
method. Perhaps an IntersectionObserver or checkVisibility() will be needed to make this work reliably.
E.g. https://continente.pt. This is different from #28, since there's no error log in the console. I believe I used to be able to run the script on the site in the past, but can't be sure.