JSFiddle - React, Tailwind, and code Playground

by Ilya

HTML

<input type="text">
<button>send</button>
<div class="chat"></div>

JavaScript

document.querySelector('.customInput.noScrollbar.chat-input-field.theatermodeInputFieldChat.inputFieldChatPlaceholder').innerHTML = ':tipguys000';

const sendGif = () => {
  const inputWithPlaceholder = document.querySelector('.customInput.noScrollbar.chat-input-field.theatermodeInputFieldChat.inputFieldChatPlaceholder');
    const input = document.querySelector('.customInput.noScrollbar.chat-input-field.theatermodeInputFieldChat');
  const btn = document.querySelector('.send-button.send-button-gradient.theatermodeSendButtonChat');
  const gifArr = ['tipguys000', 'sendtipxxxxxsentip', 'tipfor', 'tipformore', 'TipForMore', 'tipG', 'tipguysshowlove', 'tipforshow', 'tipforshow024', 'tipforshow123', 'tipforher2', 'tipforherz'];
  const randomIntFromInterval = (min, max) => {
    return Math.floor(Math.random() * (max - min + 1) + min)
  }
  const rndInt = randomIntFromInterval(0, gifArr.length - 1);
  let randomIndex = gifArr[rndInt];
  let randomGif = `:${randomIndex}`;
    inputWithPlaceholder?.classList?.remove('inputFieldChatPlaceholder');
    if (input.innerHTML !== randomGif) {
        btn.click();
        input.innerHTML = randomGif
    } else {
        input.innerHTML = randomGif
    }

};