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

Open the chat window


Close the chat window


toggle the open/close state of the chat window


Hide the chat window and button

You will not see gramchat on the website (with cssdisplay:none)

Show the chat window and button


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