1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Revert "Turns out delay does apply to first element"

This reverts commit 906c6eb430.
This commit is contained in:
Raymond Hill 2023-10-19 17:23:05 -04:00
parent 906c6eb430
commit f0cd93335e
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -3981,7 +3981,7 @@ function trustedClickElement(
const clickDelay = parseInt(delay, 10) || 1;
const t0 = Date.now();
const tbye = t0 + 10000;
let tnext = clickDelay;
let tnext = selectorList.length !== 1 ? t0 : t0 + clickDelay;
const terminate = ( ) => {
selectorList.length = 0;
@ -4000,7 +4000,7 @@ function trustedClickElement(
return terminate();
}
if ( notFound ) { observe(); }
const delay = Math.max(notFound ? tbye - tnow : tnext - tnow, 17);
const delay = Math.max(notFound ? tbye - tnow : tnext - tnow, 1);
next.timer = setTimeout(( ) => {
next.timer = undefined;
process();