Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Ambil semua elemen dengan class yang diberikan
- var buttons = document.querySelectorAll('._54k8._52jg._56bs._26vk._56b_._3cqr._5uc2._8yo0._56bu');
- // Fungsi untuk menghasilkan angka acak antara min dan max (inklusif)
- function getRandomInt(min, max) {
- return Math.floor(Math.random() * (max - min + 1)) + min;
- }
- // Fungsi untuk mengklik tombol secara bergantian dengan jeda acak antara 1-8 detik
- function clickButtonsSequentially() {
- var index = 0;
- function clickNextButton() {
- if (index < buttons.length) {
- buttons[index].click();
- index++;
- var randomDelay = getRandomInt(1000, 5000); // Jeda acak antara 1-8 detik
- setTimeout(clickNextButton, randomDelay);
- }
- }
- clickNextButton();
- }
- // Panggil fungsi untuk memulai pengklikan tombol secara bergantian
- clickButtonsSequentially();
Add Comment
Please, Sign In to add comment