From f0cd93335ed26238373f5b150fe6f949b9c11380 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 19 Oct 2023 17:23:05 -0400 Subject: [PATCH] Revert "Turns out `delay` does apply to first element" This reverts commit 906c6eb430b4504a37a345d7b9c36430648e345e. --- assets/resources/scriptlets.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index d764f2b88..1c2e63afd 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -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();