Script para automagicamente responder mensagens no chat do google meet

Jarod Cavalcante
2022-11-24T00:18:38Z

meet.js

| function handleMessages(filter) {
| const valuesAlreadySent = []
|
|
| const interval = setInterval(() => {
| if (valuesAlreadySent.length >= Object.keys(filter).length) {
| clearInterval(interval)
| return
| }
| const div_message = document.querySelectorAll('div[data-message-text]')
| const textarea = document.getElementsByTagName('textarea')[0]
| const button = document.getElementsByClassName('VfPpkd-Bz112c-LgbsSe yHy1rc eT1oJ QDwDD tWDL4c Cs0vCd')[0]
| const words = Object.keys(filter)
|
|
|
| div_message.forEach((div) => {
| const message = div.dataset.messageText
| if (words.includes(message) && !valuesAlreadySent.includes(message)) {
| valuesAlreadySent.push(message)
| textarea.value = filter[message]
| button.removeAttribute("disabled")
| button.click()
| }
| })
|
| }, 2000)
|
|
|
| }
|
| handleMessages({
| presente: "testeee",
| ola: "olá, tudo bem?"
| })
|
| // tambem disponível em: https://unipad.jarodmateus.com/meet