294
| <![CDATA[<script>
function calculateMessageDelay(message) {
let delay = message.length * 30;
if (delay > 2 * 1000) delay = 3 * 1000;
if (delay < 400) delay = 1000;
return delay;
}
WebChat.default.init({
selector: "#webchat",
initPayload: "start",
channelUuid: '4481916d-0c52-4c13-94b9-117c4c8bd325',
host: 'https://new.push.al',
socketUrl: "https://socket.push.al",
title: "Bela",
showFullScreenButton: true,
inputTextFieldHint: "Escreva aqui...",
openLauncherImage: 'https://push-ilha-sp-push-media-prod.s3.amazonaws.com/media/382/a2b0/8655/a2b08655-6edf-4796-a1c9-0988ac13de48.png',
profileAvatar: 'https://push-ilha-sp-push-media-prod.s3.amazonaws.com/media/382/a2b0/8655/a2b08655-6edf-4796-a1c9-0988ac13de48.png',
customMessageDelay: calculateMessageDelay,
customizeWidget: {
headerBackgroundColor: "#21D0C0",
launcherColor: "#21D0C0",
userMessageBubbleColor: "#21D0C0",
},
params: {
images: {
dims: {
width: 300,
height: 200
}
},
storage: "local"
}
})
function isMobile() {
try {
document.createEvent("TouchEvent");
return true;
} catch (e) {
return false;
}
}
function openChat() {
if (!WebChat.isOpen() && !isMobile()) {
WebChat.open();
}
}
setTimeout(openChat, 5000);
</script>]]>
|