Untitled
unknown
plain_text
a year ago
2.0 kB
10
Indexable
// MAKE BY ANH VINH DZAI HE163166!!! function setTextareaValue(value) { const textarea = document.querySelector('textarea'); // Thay bằng cách lựa chọn phù hợp với ứng dụng của bạn if (textarea) { const nativeInputValueSetter = Object.getOwnPropertyDescriptor( window.HTMLTextAreaElement.prototype, 'value' ).set; nativeInputValueSetter.call(textarea, value); const inputEvent = new Event('input', { bubbles: true }); textarea.dispatchEvent(inputEvent); } else { console.error('Textarea element not found.'); } } function sendCommentEverySecond(comment) { const button = document.querySelector('.button-send-comment button'); if (!button) { console.error('Send button not found.'); return; } // Hiển thị dialog nhập comment và thời gian const userComment = prompt('Nhập comment của bạn:'); if (!userComment) { console.error('Comment not provided.'); return; } let timePerSubmit = 1000; let timeLimit = 1000000; // Nhập thời gian cho từng câu hỏi const timePerSubmitInput = prompt(`Nhập thời gian giữa các câu hỏi (ms), mặc định là ${timePerSubmit/1000}s:`); if (timePerSubmitInput !== null && !isNaN(parseInt(timePerSubmitInput))) { timePerSubmit = parseInt(timePerSubmitInput); } // Nhập thời gian kết thúc const timeLimitInput = prompt(`Nhập thời gian kết thúc (ms), mặc định là ${timeLimit/1000}s:`); if (timeLimitInput !== null && !isNaN(parseInt(timeLimitInput))) { timeLimit = parseInt(timeLimitInput); } let intervalId = setInterval(() => { // Đặt giá trị mới cho textarea setTextareaValue(userComment); // Bấm nút gửi button.click(); }, timePerSubmit); setTimeout(() => { clearInterval(intervalId); console.log('Sending stopped.'); }, timeLimit); } // Sử dụng hàm để bắt đầu gửi comment với thời gian tùy chọn sendCommentEverySecond();
Editor is loading...
Leave a Comment