Live chat - Native javascript

Live chat: Native Javascript Docs


Native javascript and no font-awesome cdn. The chat icons are at https://icons8.com/icons/set/chat

A view-source will show it working.

A gentle reminder. You will have to contact us with your domain for it to work. There will be no charge for 30 days.

The html...


        
        
 <button class="bubble" id="bubble">
 <img src="/chat4.png" alt="Avatar" 
 class="image" width="32">
 <i ></i>
 </button>
        
        
the css...

                .bubble{
        position:fixed;
        width:60px;
        height:60px;
        bottom:40px;
        right:40px;
        background-color:white;
        color:#FFF;
        border-radius:50px;
        text-align:center;
        box-shadow: 2px 2px 3px #999;
 }

                
and the js...


window.onload = function() {
    document.getElementById
    ('bubble').onclick 
    = function bubbleClicked() {
    var hideit;
    hideit=
    document.getElementById("bubble")
    hideit.style.display = 'none';
    const Http = new XMLHttpRequest();
    const url='https://webmail.
    appliedscience.com/Server-Code/
    Home/getipcrunch';
    Http.open("GET", url);
    Http.send();
        
    Http.onreadystatechange = (e) => {
    console.log(Http.responseText)
    window.location ="https://webmail.
    appliedscience.com/Server-Code/
    Home/loadchat?
    phone=IP"+Http.responseText
    }
           
}
        
};
 


Good luck! Happy codes...