Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- const spans = document.querySelectorAll('span[unselectable="on"]');
- const input = document.querySelector('input.txtInput');
- if (spans.length > 0 && input) {
- let text = '';
- spans.forEach(span => {
- text += span.textContent;
- });
- input.focus();
- input.value = "";
- let index = 0;
- function typeNextChar() {
- if (index < text.length) {
- input.value += text.charAt(index);
- input.dispatchEvent(new Event('input', { bubbles: true }));
- index++;
- setTimeout(typeNextChar, 100);
- }
- }
- typeNextChar();
- } else {
- console.warn("Spans or input not found.");
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement