Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vncsmnl/whatsappscripts
📲 Trava Zap para você mandar pro seu amigo. Tem vários filmes, séries e músicas.
https://github.com/vncsmnl/whatsappscripts
portfolio travazap whatsapp whatsapp-script
Last synced: about 1 month ago
JSON representation
📲 Trava Zap para você mandar pro seu amigo. Tem vários filmes, séries e músicas.
- Host: GitHub
- URL: https://github.com/vncsmnl/whatsappscripts
- Owner: vncsmnl
- Created: 2023-10-08T20:37:30.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-31T17:24:53.000Z (11 months ago)
- Last Synced: 2024-02-01T18:45:26.449Z (11 months ago)
- Topics: portfolio, travazap, whatsapp, whatsapp-script
- Language: JavaScript
- Homepage:
- Size: 208 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Video Demo Tutorial: https://www.youtube.com/watch?v=RG-dclLtYvA
# WhatsAppScripts TravaZap
- [Overview](#overview)
- [Prerequisites](#prerequisites)
- [Usage](#usage)
- [Parameters](#parameters)
- [Error Handling](#error-handling)
- [Example](#example)## Overview
The `enviarScript` function is an asynchronous JavaScript function designed to send a series of messages to a conversation on a web page. It splits the provided script text into lines, simulates user input by typing each line into the conversation textarea, and then clicks the send button to dispatch the messages.
## Prerequisites
REQUIREMENT: WhatsApp Web Version
https://web.whatsapp.com/Before using the `enviarScript` function, ensure the following:
- The script is executed in an environment with access to the DOM (Document Object Model) as it interacts with web page elements.
- The conversation must be open and accessible in the DOM.
- The function is called with the appropriate permissions, considering browser security restrictions.## Usage
1. Include the script containing the `enviarScript` function in your HTML document.
2. Ensure the conversation is open and accessible in the DOM.
3. Press F12, open console tab and paste raw script.
4. Enter to the `enviarScript` function with the desired script text.## Parameters
- `scriptText`: A string containing the script to be sent as messages. Each line in the script will be treated as a separate message.
## Error Handling
The function may throw an error if no conversation is open. Ensure that a conversation is active in the DOM before calling the function.
## Example
```javascript
// Example script to be sent
const script = `
Coloque o seu texto aqui
Put your text here
`;// Calling the enviarScript function
enviarScript(script, 2000)
.then(e => console.log(`CĂłdigo finalizado, ${e} mensagens enviadas`))
.catch(console.error);
```In this example, the `enviarScript` function is called with a multi-line script, and the completion message or error is logged to the console.
Feel free to customize the script and adapt the function to fit your specific use case.
## đź“ť License.
[![License](https://img.shields.io/github/license/vncsmnl/WhatsAppScripts?style=flat&logo=github&color=blue)](https://github.com/vncsmnl/WhatsAppScripts/blob/main/LICENSE)
```
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004Copyright (C) 2004 Sam Hocevar
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION0. You just DO WHAT THE FUCK YOU WANT TO.
```