Last active
February 4, 2020 16:53
-
-
Save marcocastignoli/99ce6a58014b7d5708d08e7e5119654a to your computer and use it in GitHub Desktop.
Notification on whatsapp when contact is writing
This file contains hidden or 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
| var notificationNumber = 0 | |
| const timer = window.setInterval(function(){ | |
| var notification | |
| if(document.getElementsByClassName('_2ZAIy').length > 0) { | |
| if (notificationNumber < 10) { | |
| notificationNumber++ | |
| } else { | |
| notificationNumber = 0 | |
| notification = new Notification('stanno scrivendo', { body: "stanno scrivendo" }); | |
| } | |
| } | |
| }, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment