-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontroller.js
More file actions
53 lines (39 loc) · 1.44 KB
/
controller.js
File metadata and controls
53 lines (39 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
$(document).ready(function () {
// Display Speak Message
eel.expose(DisplayMessage)
function DisplayMessage(message) {
$(".siri-message li:first").text(message);
$('.siri-message').textillate('start');
}
// Display hood
eel.expose(ShowHood)
function ShowHood() {
$("#Oval").attr("hidden", false);
$("#SiriWave").attr("hidden", true);
}
eel.expose(senderText)
function senderText(message) {
var chatBox = document.getElementById("chat-canvas-body");
if (message.trim() !== "") {
chatBox.innerHTML += `<div class="row justify-content-end mb-4">
<div class = "width-size">
<div class="sender_message">${message}</div>
</div>`;
// Scroll to the bottom of the chat box
chatBox.scrollTop = chatBox.scrollHeight;
}
}
eel.expose(receiverText)
function receiverText(message) {
var chatBox = document.getElementById("chat-canvas-body");
if (message.trim() !== "") {
chatBox.innerHTML += `<div class="row justify-content-start mb-4">
<div class = "width-size">
<div class="receiver_message">${message}</div>
</div>
</div>`;
// Scroll to the bottom of the chat box
chatBox.scrollTop = chatBox.scrollHeight;
}
}
});