mirror of https://github.com/gorhill/uBlock.git
Turns out `delay` does apply to first element
Regarding `trusted-click-element`, and as per documentation and code: - https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-trusted-scriptlets.md#trusted-scriptlets - https://github.com/AdguardTeam/Scriptlets/blob/master/src/scriptlets/trusted-click-element.js
This commit is contained in:
parent
e873fd5378
commit
906c6eb430
|
@ -3981,7 +3981,7 @@ function trustedClickElement(
|
|||
const clickDelay = parseInt(delay, 10) || 1;
|
||||
const t0 = Date.now();
|
||||
const tbye = t0 + 10000;
|
||||
let tnext = selectorList.length !== 1 ? t0 : t0 + clickDelay;
|
||||
let tnext = 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, 1);
|
||||
const delay = Math.max(notFound ? tbye - tnow : tnext - tnow, 17);
|
||||
next.timer = setTimeout(( ) => {
|
||||
next.timer = undefined;
|
||||
process();
|
||||
|
|
Loading…
Reference in New Issue