Improve trusted-click-element scriptlet

Related feedback:
https://github.com/uBlockOrigin/uAssets/discussions/30340
This commit is contained in:
Raymond Hill 2025-10-10 10:18:16 -04:00
parent 04dbfa556b
commit f9bb6d7f7e
No known key found for this signature in database
GPG key ID: F5630CAE62A14316

View file

@ -2197,6 +2197,9 @@ function trustedClickElement(
if ( typeof steps[i-1] !== 'string' ) { continue; }
steps.splice(i, 0, clickDelay);
}
if ( steps.length === 1 && delay !== '' ) {
steps.unshift(clickDelay);
}
if ( typeof steps.at(-1) !== 'number' ) {
steps.push(10000);
}