Hiding embedded widget when all agents are offline

Article ID: 92320  

Question
I would like to hide the tab for the embedded window when all agents are offline

Answer

To hide the tab for the mbedded widget installation when all agents are offline please add the following JavaScript code anywhere on the page where embedded chat widget is installed:

 

 

<script>
function lhnStatusUpdate(){
    if(lhnJsSdk.isOnline == false){
      document.getElementById('lhnHocButton').style.display = 'none';
    }else{
      document.getElementById('lhnHocButton').style.display = 'block';
    }
  }
</script>

 


Article Details
Views: 3093 Created on: Jun 19, 2017