Fixed too strong captcha detection

This commit is contained in:
2026-02-14 22:49:05 +01:00
parent 8725f4ddde
commit ddb712ba4a
4 changed files with 31 additions and 33 deletions
+17 -6
View File
@@ -31,12 +31,23 @@ async function detectCaptcha(page) {
for (const selector of config.selectors) {
const elements = document.querySelectorAll(selector);
if (elements.length > 0) {
results.push({
type: type,
name: config.name,
selector: selector,
count: elements.length
});
for (const el of elements) {
const style = window.getComputedStyle(el);
const rect = el.getBoundingClientRect();
const isVisible = style.display !== 'none' &&
style.visibility !== 'hidden' &&
style.opacity !== '0' &&
rect.width > 0 &&
rect.height > 0;
results.push({
type: type,
name: config.name,
selector: selector,
count: elements.length,
isVisible: isVisible
});
}
break;
}
}