Last active
January 3, 2022 12:46
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
// hold chat list | |
var chatlist = document.getElementsByClassName('_55za'); | |
for(var x=0; x<chatlist.length; x++) { // loop | |
// open chatbox by triggering click | |
chatlist[x].click(); | |
// get message textarea | |
var messages = document.getElementsByClassName('_552m'); | |
// set its value | |
messages[0].value = 'Happy new year! I hope this new year will bring good luck to you and your family and to all your friends. -CHEERS :D'; | |
// declare new event | |
var e = new Event("keydown"); | |
// keycode for Enter/Return key | |
e.keyCode = 13; | |
// trigger | |
messages[0].dispatchEvent(e); | |
var closeBtn = document.getElementsByClassName('_3olu'); | |
// finally close the chat box | |
closeBtn[0].click(); | |
} |
It does not work
Everything can be done much easier. I use a software called cucomm. It automatically sends messages to users on Facebook. It saves time and is much more convenient.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
class layouts are deprecated now.. no use of this script now