Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silently fails on some sites #29

Open
waldyrious opened this issue Oct 26, 2022 · 2 comments
Open

Silently fails on some sites #29

waldyrious opened this issue Oct 26, 2022 · 2 comments

Comments

@waldyrious
Copy link
Owner

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.

@waldyrious
Copy link
Owner Author

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".

@waldyrious
Copy link
Owner Author

waldyrious commented Dec 27, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant