From 4e239d53afc2e51c731f67a977c4114e35545598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B3=A0=EB=82=A8=ED=98=84?= Date: Thu, 12 Nov 2020 15:39:50 +0900 Subject: [PATCH] fix --- app/index.js | 5 +++-- app/servers.html | 2 ++ lib/http.js | 7 +++++++ lib/xml.js | 8 ++++---- stdout.txt | 2 ++ token.txt | 1 + userid.txt | 1 + webloader.js | 2 +- 8 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 stdout.txt create mode 100644 token.txt create mode 100644 userid.txt diff --git a/app/index.js b/app/index.js index 23374d6..585467a 100644 --- a/app/index.js +++ b/app/index.js @@ -201,7 +201,7 @@ var getMyServers = function(assignedServers) { pingtest(); setInterval(pingtest, 5000); - document.getElementById("btn_pingtest").onclick = pingtest; + //document.getElementById("btn_pingtest").onclick = pingtest; getMyApplications(); }; @@ -249,7 +249,8 @@ if (typeof(token) !== "undefined") { exit(0); }; - document.getElementById("btn_assign").onclick = assign; + //document.getElementById("btn_assign").onclick = assign; + assign(); } else { OldBrowser.setContent(FILE.readFile("app\\login.html", "utf-8")); diff --git a/app/servers.html b/app/servers.html index 460af71..3a34b38 100644 --- a/app/servers.html +++ b/app/servers.html @@ -52,7 +52,9 @@
+
diff --git a/lib/http.js b/lib/http.js index 66c8068..cb56452 100644 --- a/lib/http.js +++ b/lib/http.js @@ -12,6 +12,7 @@ var HTTPObject = function() { this.method = ""; this.headers = {}; this.dataType = ""; + this.userAgent = "WelsonJS/0.1.4-dev (https://github.com/gnh1201/welsonjs)"; this.create = function() { this.interface = CreateObject([ @@ -130,6 +131,11 @@ var HTTPObject = function() { return this; }; + this.setUserAgent = function(agent) { + this.userAgent = agent; + this.setHeader("User-Agent", this.userAgent); + }; + this.open = function(method, url, isAsync) { this.setMethod(method.toUpperCase()); @@ -210,6 +216,7 @@ var HTTPObject = function() { }; this.create(); + this.setUserAgent(this.userAgent); }; exports.create = function() { diff --git a/lib/xml.js b/lib/xml.js index 38bdc46..a00b12c 100644 --- a/lib/xml.js +++ b/lib/xml.js @@ -3,7 +3,7 @@ //////////////////////////////////////////////////////////////////////// var FILE = require("lib/file"); -var StreamBuilder = function(data) { +var StreamConvert = function(data) { this.data = data; this.toBinary = function() { @@ -48,7 +48,7 @@ var XMLObject = function(dom) { "Msxml2.DOMDocument.5.0", "Msxml2.DOMDocument.4.0", "Msxml2.DOMDocument.3.0", - "MSXML2.DOMDocument", + "Msxml2.DOMDocument", "MSXML.DOMDocument" ]); } @@ -117,7 +117,7 @@ var XMLObject = function(dom) { dom.dataType = type; if (type.indexOf("bin.") == 0) { - dom.nodeTypedValue = (new StreamBuilder(value)).toBinary(); + dom.nodeTypedValue = (new StreamConvert(value)).toBinary(); } else { dom.nodeTypedValue = value; } @@ -130,7 +130,7 @@ var XMLObject = function(dom) { dom.dataType = type; if (type.indexOf("bin.") == 0) { - dom.text = (new StreamBuilder(value)).toString(); + dom.text = (new StreamConvert(value)).toString(); } else { dom.text = value; } diff --git a/stdout.txt b/stdout.txt new file mode 100644 index 0000000..d506e9c --- /dev/null +++ b/stdout.txt @@ -0,0 +1,2 @@ +0,LDPlayer,0,0,0,-1,-1 +1,LDPlayer-1,0,0,0,-1,-1 diff --git a/token.txt b/token.txt new file mode 100644 index 0000000..813b878 --- /dev/null +++ b/token.txt @@ -0,0 +1 @@ +eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MSwiZXhwIjoxNjA1MTU4NjA2LCJ0dGwiOjIwLCJ0eXBlIjoiYXV0aCIsImtleSI6Ijg1N2NlZDg1LTMzOWEtNDViNS04YTQ5LTJjOGM0YmE4ZDVmNCIsInByb2plY3QiOiJuZXRzb2xpZCJ9.4g7ChYBd7fnGivaLif50R1uVaHp08wDXacn-cOXPLKA \ No newline at end of file diff --git a/userid.txt b/userid.txt new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/userid.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/webloader.js b/webloader.js index fb8bf7e..f6dcbcd 100644 --- a/webloader.js +++ b/webloader.js @@ -27,7 +27,7 @@ global.console._echo = function(msg, type) { icon = "info"; default: - heading = "Message"; + heading = "Success"; icon = "success"; }