Tab indent update

This commit is contained in:
ElPumpo
2018-09-01 17:43:35 +02:00
parent 7e31fc90f4
commit c07cdde7c8
14 changed files with 2058 additions and 2407 deletions
+25 -25
View File
@@ -1,42 +1,42 @@
(() => {
let ESXWrapper = {};
ESXWrapper.MessageSize = 1024;
ESXWrapper.messageId = 0;
let ESXWrapper = {};
ESXWrapper.MessageSize = 1024;
ESXWrapper.messageId = 0;
window.SendMessage = function(namespace, type, msg) {
window.SendMessage = function (namespace, type, msg) {
ESXWrapper.messageId = (ESXWrapper.messageId < 65535) ? ESXWrapper.messageId + 1 : 0;
const str = JSON.stringify(msg);
ESXWrapper.messageId = (ESXWrapper.messageId < 65535) ? ESXWrapper.messageId + 1 : 0;
const str = JSON.stringify(msg);
for(let i=0; i<str.length; i++) {
for (let i = 0; i < str.length; i++) {
let count = 0;
let chunk = '';
let count = 0;
let chunk = '';
while(count < ESXWrapper.MessageSize && i<str.length) {
while (count < ESXWrapper.MessageSize && i < str.length) {
chunk += str[i];
chunk += str[i];
count++;
i++;
}
count++;
i++;
}
i--;
i--;
const data = {
__type : type,
id : ESXWrapper.messageId,
chunk : chunk
}
const data = {
__type: type,
id: ESXWrapper.messageId,
chunk: chunk
}
if(i == str.length - 1)
data.end = true;
if (i == str.length - 1)
data.end = true;
$.post('http://' + namespace + '/__chunk', JSON.stringify(data));
$.post('http://' + namespace + '/__chunk', JSON.stringify(data));
}
}
}
}
})()