Remove spinner from bottom of chatwindow

Hi! How do we prevent the twc-spinner at the bottom of the chat without interfering with the typing indicators? In on(engine_request) we have the following code snippet:
var spinner = document.querySelectorAll(‘[role=“progressbar”]’);
if(spinner.length > 0) spinner[0].remove();
which will remove the spinner during a chat conversation, but not when the user initially opens the chat window. Any suggestions?

Hi. Try hiding it with CSS instead of removing the HTML element.

Sure, but how do I target the spinner at the bottom without also hiding the typing indicators? If I display none for twc-spinner, the typing indicator-messages for the bot will just be empty messages.
Thanks!

Hi. A clean way to handlte these kind of things is via CSS using extensions where needed and avoiding removing elements from the HTML skeleton directly. Try this one, for example:

.twc-chat-window > .twc-spinner {
    display: none;
}