diff --git a/index-multiple-account.html b/index-multiple-account.html
index 3929c64..05a2bf3 100644
--- a/index-multiple-account.html
+++ b/index-multiple-account.html
@@ -2,17 +2,73 @@
@@ -67,6 +122,7 @@
template.find('.title').html(clientId);
template.find('.description').html(clientDescription);
+ template.find('.logs').append($('').text('Connecting...'));
$('.client-container').append(template);
socket.emit('create-session', {
@@ -94,9 +150,9 @@
$('.client-container').append(template);
if (session.ready) {
- $(`.client.${clientClass} .logs`).append($('').text('Whatsapp is ready!'));
+ $(`.client.${clientClass} .logs`).prepend($('').text('Whatsapp is ready!'));
} else {
- $(`.client.${clientClass} .logs`).append($('').text('Connecting...'));
+ $(`.client.${clientClass} .logs`).prepend($('').text('Connecting...'));
}
}
});
@@ -106,7 +162,7 @@
});
socket.on('message', function(data) {
- $(`.client.client-${data.id} .logs`).append($('').text(data.text));
+ $(`.client.client-${data.id} .logs`).prepend($('').text(data.text));
});
socket.on('qr', function(data) {
diff --git a/index.html b/index.html
index 1a007b0..b134215 100644
--- a/index.html
+++ b/index.html
@@ -2,6 +2,44 @@
Whatsapp API by Ngekoding
+
+
+
+
@@ -20,7 +58,7 @@
var socket = io();
socket.on('message', function(msg) {
- $('.logs').append($('').text(msg));
+ $('.logs').prepend($('').text(msg));
});
socket.on('qr', function(src) {