Frontend Javascript API
You can interact with the chat window from within your own javascript functionality. We offer you some easy functions to controll it.
As long as gramchat is initalized, you can access it via the global variable chat
Visibility of chat window
gram.open()
Open the chat window
gram.close()
Close the chat window
gram.toggle()
toggle the open/close state of the chat window
gram.hide()
Hide the chat window and button
You will not see gramchat on the website (with cssdisplay:none
)
gram.show()
Show the chat window and button
Messages
gram.push("your message to show")
Pushes the message (string) you pass in the function into the chat window without sending it to the server
Last updated
Was this helpful?