|
|
@ -45,8 +45,6 @@ function getWelcomeText() {
|
|
|
|
function botReply(message){
|
|
|
|
function botReply(message){
|
|
|
|
message_container.innerHTML += `<div class="bot">${message}</div>`;
|
|
|
|
message_container.innerHTML += `<div class="bot">${message}</div>`;
|
|
|
|
location.href = '#edge';
|
|
|
|
location.href = '#edge';
|
|
|
|
document.querySelector(".chat").scrollTop = document.querySelector(".chat").scrollHeight;
|
|
|
|
|
|
|
|
document.title = '(1) - Smart Speaker Theatre'
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function selfReply(message){
|
|
|
|
function selfReply(message){
|
|
|
@ -58,6 +56,8 @@ function selfReply(message){
|
|
|
|
setTimeout(function() {
|
|
|
|
setTimeout(function() {
|
|
|
|
botReply(reply);
|
|
|
|
botReply(reply);
|
|
|
|
}, getRandomNumber(425, 1000, 200)); // Random delay for answer between 225 and 1000 ms, with 200ms increments
|
|
|
|
}, getRandomNumber(425, 1000, 200)); // Random delay for answer between 225 and 1000 ms, with 200ms increments
|
|
|
|
|
|
|
|
document.querySelector(".chat").scrollTop = document.querySelector(".chat").scrollHeight;
|
|
|
|
|
|
|
|
document.title = '(1) - Smart Speaker Theatre'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|