mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
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 clickDelay = parseInt(delay, 10) || 1;
|
||||||
const t0 = Date.now();
|
const t0 = Date.now();
|
||||||
const tbye = t0 + 10000;
|
const tbye = t0 + 10000;
|
||||||
let tnext = selectorList.length !== 1 ? t0 : t0 + clickDelay;
|
let tnext = clickDelay;
|
||||||
|
|
||||||
const terminate = ( ) => {
|
const terminate = ( ) => {
|
||||||
selectorList.length = 0;
|
selectorList.length = 0;
|
||||||
@ -4000,7 +4000,7 @@ function trustedClickElement(
|
|||||||
return terminate();
|
return terminate();
|
||||||
}
|
}
|
||||||
if ( notFound ) { observe(); }
|
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 = setTimeout(( ) => {
|
||||||
next.timer = undefined;
|
next.timer = undefined;
|
||||||
process();
|
process();
|
||||||
|
Loading…
Reference in New Issue
Block a user