<?php\r
\r
+ $node_config = json_decode(file_get_contents("node/config.json"), true);\r
+\r
switch(true){\r
case stripos($_SERVER['HTTP_USER_AGENT'], 'android') > 0:\r
$agent = "android"; $touchscreen = true;\r
var agent = '<?php echo $agent; ?>';\r
var touchscreen = <?php echo ($touchscreen) ? 'true' : 'false'; ?>;\r
var init_data = {};\r
- var kiwi_server = 'wss://<?php echo $node_server; ?>:7777/';\r
+ var kiwi_server = '<?php echo ($node_config['listen_ssl'] ? "https" : "http")."://".$node_server; ?>:7777/';\r
var touch_scroll;\r
\r
$(document).ready(function(){\r
gateway.socket.on('message', gateway.parse);
gateway.socket.on('disconnect', function () {
// Teardown procedure here
- // TODO: Ask Ehm if teardown with socket.io is required
$(gateway).trigger("ondisconnect", {});
});
});