diff --git a/bin/client/config.json b/bin/client/config.json new file mode 100644 index 0000000..4108969 --- /dev/null +++ b/bin/client/config.json @@ -0,0 +1 @@ +{"serveraddress": "ws://localhost:9343","addressalert": false} \ No newline at end of file diff --git a/bin/client/index.html b/bin/client/index.php similarity index 99% rename from bin/client/index.html rename to bin/client/index.php index 708f834..6314899 100644 --- a/bin/client/index.html +++ b/bin/client/index.php @@ -30,6 +30,7 @@ pragm + diff --git a/bin/client/script.js b/bin/client/script.js index 567e358..6aeb5e8 100644 --- a/bin/client/script.js +++ b/bin/client/script.js @@ -1,4 +1,4 @@ -var clientversion = "0.606"/****************************************************************************************** +var clientversion = "0.609"/****************************************************************************************** # # Copyright 2014 Dustin Robert Hoffner # @@ -1603,6 +1603,7 @@ var globalEvent = new globalEvent_typ(); var global_typ = function global_typ(){ + this.config = JSON.parse(globalconfig); this.websocket_server_address_online = 'ws://pragm.dyndns-work.com:9343'; this.websocket_server_address_local = 'ws://localhost:9343'; this.websocket_server_address = 'ws://91.89.70.45:9343'; @@ -1611,13 +1612,18 @@ var global_typ = function global_typ(){ this.websocket_server_address_array[0] = 'ws://localhost:9343'; //ws://pragm.dyndns-work.com:9300 this.websocket_server_address_array[3] = 'ws://localhost:9342'; this.websocket_server_address_array[2] = 'ws://demo.pragm.de:9342'; - this.websocket_server_address_array[1] = 'ws://demo.pragm.de:9343'; + this.websocket_server_address_array[1] = 'ws://demo.pragm.de:9343'; this.actualServer = -1; this.pServer = this.websocket_server_address_array[3]; this.firstConnect = true; this.firstTry = true; this.get_websocket_server_address = function(){ + if(this.config.addressalert){ + return prompt("WebSocket Server:", this.pServer); + } else { + return this.config.serveraddress; + } if(this.firstTry){ this.firstTry = false; //return prompt("WebSocket Server:", this.pServer); diff --git a/bin/server/serverBuild.js b/bin/server/serverBuild.js index 091b2af..40ca08d 100644 --- a/bin/server/serverBuild.js +++ b/bin/server/serverBuild.js @@ -1,5 +1,5 @@ -//Server-Build Version: BETA => 0.606 -console.log(""); console.log("pragm-Websocket-Server => BUILD 0.606 BETA"); console.log(""); +//Server-Build Version: BETA => 0.609 +console.log(""); console.log("pragm-Websocket-Server => BUILD 0.609 BETA"); console.log(""); /****************************************************************************************** # # Copyright 2014 Dustin Robert Hoffner diff --git a/source/client-side/global_vars.js b/source/client-side/global_vars.js index 2987f03..1e3a6bd 100644 --- a/source/client-side/global_vars.js +++ b/source/client-side/global_vars.js @@ -24,6 +24,7 @@ var global_typ = function global_typ(){ + this.config = JSON.parse(globalconfig); this.websocket_server_address_online = 'ws://pragm.dyndns-work.com:9343'; this.websocket_server_address_local = 'ws://localhost:9343'; this.websocket_server_address = 'ws://91.89.70.45:9343'; @@ -32,13 +33,18 @@ var global_typ = function global_typ(){ this.websocket_server_address_array[0] = 'ws://localhost:9343'; //ws://pragm.dyndns-work.com:9300 this.websocket_server_address_array[3] = 'ws://localhost:9342'; this.websocket_server_address_array[2] = 'ws://demo.pragm.de:9342'; - this.websocket_server_address_array[1] = 'ws://demo.pragm.de:9343'; + this.websocket_server_address_array[1] = 'ws://demo.pragm.de:9343'; this.actualServer = -1; this.pServer = this.websocket_server_address_array[3]; this.firstConnect = true; this.firstTry = true; this.get_websocket_server_address = function(){ + if(this.config.addressalert){ + return prompt("WebSocket Server:", this.pServer); + } else { + return this.config.serveraddress; + } if(this.firstTry){ this.firstTry = false; //return prompt("WebSocket Server:", this.pServer); diff --git a/source/client-style/index.html b/source/client-style/index.php similarity index 99% rename from source/client-style/index.html rename to source/client-style/index.php index e23421d..1bc6cde 100644 --- a/source/client-style/index.html +++ b/source/client-style/index.php @@ -30,6 +30,7 @@ pragm +