Last active
January 3, 2022 12:46
-
-
Save renielsalvador/b87af7e43bd03529edf4 to your computer and use it in GitHub Desktop.
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
// 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(); | |
} |
hello bro Plz how to test this script!
You can try to copy and paste it in your console.
Hi ! On which Facebook page do you run the script ?
please tell the steps to run the script.
class layouts are deprecated now.. no use of this script now
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
how to test this!