Customize LiveChat button

Hi, I would like to hide the button of the widget once I clicked on the chat button for my livechat. I used the LiveChat Widget api :
RocketChat(function() {
this.onChatMaximized(function() {
// do whatever you want
//document.getElementsByClassName(".button–icon__1XYQW").style.visibility = hidden; or
document.getElementsByClassName(".button–icon__1XYQW").style.display = none ;
});
});

but I cant get the class name of the button.How Can I possibly implement this. Thanks

Hi, I would like to hide the button of the widget once I clicked on the chat button for my livechat. I used the LiveChat Widget api for the event trigger.
but I cant get the class name of the button.How Can I possibly implement this. Thanks?

And is there a way that I can call the var name for the visitor so that I can set it inside the canned message for an automatic recognition of visitors name ?