-
Notifications
You must be signed in to change notification settings - Fork 1
Glassdoor
HOA PHAN edited this page Nov 11, 2023
·
1 revision
function clickSequentially(elements, intervalMin, intervalMax) {
let index = 0;
function clickElement() {
if (index < elements.length) {
elements[index].click();
index++;
const randomInterval = Math.floor(Math.random() * (intervalMax - intervalMin + 1) + intervalMin);
setTimeout(clickElement, randomInterval * 1000);
}
}
clickElement();
}
const elements = jQuery('.review-details__review-details-module__helpfulButton');
clickSequentially(elements, 2, 5);