Replace with “O”
const txt = document.body.appendChild(
document.createElement('textarea')
);
document.body.style.margin = 0;
Object.assign(txt.style, {
position: 'relative',
width: '90%',
fontSize: '1.5em',
borderRadius: 0,
padding: '1em',
outline: 'none'
});
txt.setAttribute('placeholder', 'enter some text');
const result = document.body.appendChild(
document.createElement('div')
);
Object.assign(result.style, {
padding: '1em',
fontSize: '2em'
});
txt.addEventListener('input', () => {
result.innerHTML = txt.value.replace(/[aeiou]/gi, 'o');
});
This snippet takes input into a textfield and replaces all vowels with the letter “o”. I saw a meme that did something like this with musical instruments piano = poono, guitar = gootor
etc..