Code Auto Select
tvq2802
plain_text
a year ago
763 B
57
Indexable
// Escape các ký tự đặc biệt trong class của button var escapedClass = '.uppercase.tracking-widest.transition-all'; // Định nghĩa hàm để thực hiện click vào button function clickButton() { var button = document.querySelector(escapedClass); // Kiểm tra xem có phần tử tìm thấy không if (button) { // Tạo và kích hoạt sự kiện click var clickEvent = new MouseEvent('click', { bubbles: true, cancelable: true, view: window }); button.dispatchEvent(clickEvent); } else { console.log('Không tìm thấy button phù hợp'); } } // Lặp lại thao tác click mỗi giây setInterval(clickButton, 1000);
Editor is loading...
Leave a Comment