Created
February 9, 2024 16:04
-
-
Save ibernabel/f01540b5f5d9b324f6706af7cdfc4179 to your computer and use it in GitHub Desktop.
Script to go (select) to the WhatsApp web version when sending an automatic message.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout(function(){ | |
const url = window.location.href; | |
if(url.includes("api.whatsapp.com")){ | |
let button = document.querySelector("#action-button"); | |
button.click(); | |
setTimeout(function(){ | |
let link = document.querySelector("#fallback_block > div > div > h4:nth-child(2) > a"); | |
link.click(); | |
},300); | |
} | |
},300); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment