Skip to content

Instantly share code, notes, and snippets.

@chernjie
Created December 30, 2025 22:46
Show Gist options
  • Select an option

  • Save chernjie/551d008a4acdcd33b640c977f562d6ce to your computer and use it in GitHub Desktop.

Select an option

Save chernjie/551d008a4acdcd33b640c977f562d6ce to your computer and use it in GitHub Desktop.
Slideshow
var setRandomInterval = (intervalFunction, minDelay, maxDelay) => {
let timeout;
const runInterval = () => {
const timeoutFunction = () => {
intervalFunction();
runInterval();
};
const delay = Math.floor(Math.random() * (maxDelay - minDelay + 1)) + minDelay;
timeout = setTimeout(timeoutFunction, delay);
};
runInterval();
return {
clear() { clearTimeout(timeout) },
};
};
var dqs = window.$$
var aa = aa || []
aa.push(
setRandomInterval(
() => dqs('button')
.filter(e => /Next/.test(e.innerHTML))
.shift()
.click(),
9999,
19999
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment