var button = document.createElement("button"); button.style.position = "fixed"; button.style.zIndex = "99999"; button.style.bottom = "20px"; button.style.right = "20px"; button.style.height = "40px"; button.style.width = "40px"; button.style.backgroundColor = "#3398DB"; button.style.boxSizing = "border-box"; button.style.borderStyle = "solid"; button.style.borderColor = "#3398DB"; button.style.backgroundColor = "#3398DB"; button.style.borderRadius = "100%"; button.style.boxShadow = "0px 0px 5px 2px rgba(0,0,0,0.3)"; button.style.transition = "all 0.3s ease"; button.style.backgroundImage = 'url("https://firebasestorage.googleapis.com/v0/b/app-kommunity.appspot.com/o/LOGO_Kommunity_bas.png?alt=media&token=d0103f0e-182c-4ebf-a376-ca74e62488b8")'; button.style.backgroundSize = "40px"; button.style.backgroundRepeat = "no-repeat"; button.style.backgroundPosition = "center"; var divWelcomeMessage = document.createElement("div"); var x = document.createElement("button"); x.style.position = "fixed"; x.style.zIndex = "99999"; x.style.bottom = "70px"; x.style.right = "20px"; x.style.height = "60px"; x.style.width = "250px"; x.style.backgroundColor = "#3398DB"; x.style.boxSizing = "border-box"; x.style.borderStyle = "solid"; x.style.backgroundColor = "white"; x.style.color = 'black'; x.style.fontSize = '14px'; x.style.borderRadius = "10px"; x.style.boxShadow = "0px 0px 5px 2px rgba(0,0,0,0.3)"; x.style.transition = "all 0.3s ease"; x.style.backgroundSize = "20px"; x.style.backgroundRepeat = "no-repeat"; x.style.backgroundPosition = "center"; x.innerHTML = "" var closeWelcomeMessage = document.createElement("img"); closeWelcomeMessage.id = "closeWelcomeMessage"; closeWelcomeMessage.src = "https://firebasestorage.googleapis.com/v0/b/app-kommunity.appspot.com/o/cross.svg?alt=media&token=91135224-9832-49d3-9104-c64bb8c29b18"; closeWelcomeMessage.style.position = 'fixed'; closeWelcomeMessage.style.right = '30px'; closeWelcomeMessage.style.bottom = '110px'; closeWelcomeMessage.style.cursor = 'pointer'; closeWelcomeMessage.style.zIndex = '100000'; divWelcomeMessage.appendChild(x); divWelcomeMessage.addEventListener("click", function() { divWelcomeMessage.style.display = 'none'; }); var z = document.createElement("div"); z.style.position = "fixed"; z.style.zIndex = "9999"; z.style.bottom = "50px"; z.style.right = "75px"; z.style.transform = "rotate(45deg)"; z.style.height = "10px"; z.style.width = "10px"; z.style.backgroundColor = "#3398DB"; z.style.boxSizing = "border-box"; z.style.borderStyle = "solid"; z.style.backgroundColor = "white"; z.style.color = 'black'; z.style.fontSize = '16px'; z.style.boxShadow = "0px 0px 5px 2px rgba(0,0,0,0.3)"; z.style.transition = "all 0.3s ease"; z.style.backgroundSize = "20px"; z.style.backgroundRepeat = "no-repeat"; z.style.backgroundPosition = "center"; var dov = document.createElement('div'); dov.innerHTML = 'Powered By Kommunity.co'; dov.style.textAlign = 'center'; dov.style.margin = '5px'; dov.style.fontSize = '12px'; var iframe = document.createElement("iframe"); iframe.src = 'https://app-kommunity.web.app/#/apps/chat/Ex9AkO00FZ9TiFn6x5hW'; var chat = document.createElement('div'); iframe.style.height = "420px"; iframe.style.marginBottom = "-10px"; chat.height = 450; chat.width = 300; chat.style.backgroundColor = "#3398DB"; chat.style.display = "none"; chat.style.position = "fixed"; chat.style.bottom = "0"; chat.style.right = "0"; chat.style.margin = "20px"; chat.style.zIndex = "9999"; chat.style.borderRadius = "25px"; chat.style.border= "1px solid lightgray"; var close = document.createElement('span'); close.style = "float:right;background-color:#3398DB;margin-top:10px;margin-right:10px;"; var iclose = document.createElement('img'); iclose.style.width = "20px"; iclose.src = "https://firebasestorage.googleapis.com/v0/b/app-kommunity.appspot.com/o/cross.svg?alt=media&token=91135224-9832-49d3-9104-c64bb8c29b18"; iclose.style.cursor = "pointer"; close.appendChild(iclose); var idiv = document.createElement('div'); chat.appendChild(close); idiv.appendChild(iframe); idiv.appendChild(dov); chat.appendChild(idiv); var trig = 0; var body = document.body; body.appendChild(chat); body.appendChild(button); button.addEventListener("click", function() { button.style.display = "none"; chat.style.display = "block"; trig = 1; }); close.addEventListener("click", function() { button.style.display = "block"; chat.style.display = "none"; }); button.style.display = "none"; setTimeout(() => { button.style.display = "block"; }, 4000);