product icon

How to End the Session

Articles related to customization are written for a technical audience who have experience in web development. Knowledge of HTML, CSS, and JavaScript are required.

You can learn from this article how to end the session.

File to edit: LanguagesForChatOnlyMode.js

var ic_hic_demo_timer = null;
ic_hic_demo_timer = setInterval(ic_hic_demo_timer_checkobject, 100);
function ic_hic_demo_timer_checkobject()
{
if ((ICObject != null) && (ICObject.pMainContentArea != null) && (ICObject.pSessionEndButton
 != null))
  {
    clearInterval(ic_hic_demo_timer);
    ICObject.EndSesssionButton = document.createElement("div");
    ICObject.EndSesssionButton.className = "demoButton";
    ICObject.EndSesssionButton.onclick = function ()
    {
      ICObject.EndSession();
      this.style.cursor = "default";
      this.disabled = true;
    }
    ICObject.EndSesssionButton.innerHTML = "End<br />Session"; 
    ICObject.pMainContentArea.appendChild(ICObject.EndSesssionButton);
  }
}

File to edit: InstantChat.css

.demoButton
{
  position: absolute;
  left: 94px;
  top: 32px;
  width: 50px;
  height: 43px;
  text-align: center;
  cursor: pointer;
  background-color: red;
  z-index: 2000;
}
Article last updated: 27 September, 2022