Skip to content

Instantly share code, notes, and snippets.

@walpolea
Created August 7, 2020 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walpolea/dffef55dce69458334a82ea954976818 to your computer and use it in GitHub Desktop.
Save walpolea/dffef55dce69458334a82ea954976818 to your computer and use it in GitHub Desktop.
let TEXTSTR = "";
document.querySelectorAll('span[unselectable="on"]').forEach((s) => (TEXTSTR += s.innerText));
TEXTSTR = TEXTSTR.split("");
let I = document.querySelector('input[autocorrect="off"]');
let i = setInterval(() => {
TEXTSTR.length > 0 ? (I.value += TEXTSTR.shift()) : clearInterval(i);
}, 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment