This is a chrome extension which can detect and get the user input while they are still typing.
In this project, I use setTimeInterval(2 secs) to detect whether the user is typing and extract the input.
Install it by download the project and add it to your Google chrome browser.
Install the extension and open Facebook. Find a person and send a message to him/her.
The result will be shown in the console.
The "checkFocus~" is the name of the function for debugging use.
The number 1 represents that there is only one chatroom. (2 represents 2 chatrooms, and so on.)
"name" represents the receiver's name.
"hihi~~~" is the message you are typing.