From eb13a474635976870b59439e3278fc4ada264038 Mon Sep 17 00:00:00 2001 From: Robert L Date: Tue, 9 Jan 2018 10:32:09 -0500 Subject: [PATCH] Fix wss:// issue --- js/local.js | 5 +++-- styles/styles.css | 5 +++-- webviewgl.htm | 3 +++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/js/local.js b/js/local.js index 2900095..ffb3530 100644 --- a/js/local.js +++ b/js/local.js @@ -286,8 +286,9 @@ function reconnect() { msg('%% Reconnecting to server...\r\n'); - // detect whether to use SSL or not - var proto = ((window.location.protocol == "https:") || settings.forceSSL.val) ? 'wss://' : 'ws://'; + // detect whether to use SSL or not /* Dont Detect because GitHub is HTTP and ATS is not. Force ws:// (RL) */ + // var proto = ((window.location.protocol == "https:") || settings.forceSSL.val) ? 'wss://' : 'ws://'; + var proto = 'ws://'; // open a new connection to ws://host:port/wsclient conn = WSClient.connect(proto + settings.serverAddress.val + ":" + settings.serverPort.val + '/wsclient'); diff --git a/styles/styles.css b/styles/styles.css index d6cf978..bd89f7c 100644 --- a/styles/styles.css +++ b/styles/styles.css @@ -157,11 +157,12 @@ input[type=radio]:checked + label:before { text-align: left; background-color: #111 } +#client { display: block; } .hidden { display: none; } #client-term-entry { width: 100%; height: 5vh; border: 0; border-top: 1px solid white; border-bottom: 1px solid white; background-color: #222; margin: 0; padding:0; resize: none; color: silver; vertical-align: middle;} @media only screen and (max-width: 1290px) { #client-tab-desc { display: none; } } @media only screen and (max-width: 900px) { .wvg-navbar { height: 6vh; font-size: 1.25em;} .wvg-controls { width: 65%;} .wvg-navbar li { padding-left: 1vw; padding-right: 2vw; padding-top: 2.0vh;} .wvg-tools span, .select-route-map {width: 95%;} - .menu-button { font-weight: bold; font-size:1.5em; padding-top: 0.5vh; } #client-tab-desc { display: none; } } -@media only screen and (max-width: 500px) { .wvg-controls { width: 100%;} .wvg-tablink { font-size: 0.75em; padding:0; padding-left: 2vw; padding-right: 2vw; } } + .menu-button { font-weight: bold; font-size:1.5em; padding-top: 0.5vh; } #client-tab-desc { display: none; } #client { display: none; }} +@media only screen and (max-width: 500px) { .wvg-controls { width: 100%;} .wvg-tablink { font-size: 0.75em; padding:0; padding-left: 2vw; padding-right: 2vw; } } @media only screen and (max-height: 575px) { .reset-container { height: 4em;} .wvg-controls { overflow-y: auto; margin-bottom: -5vh;} .wvg-tools {font-size: 0.75em;} } diff --git a/webviewgl.htm b/webviewgl.htm index 7503731..d330c23 100644 --- a/webviewgl.htm +++ b/webviewgl.htm @@ -114,6 +114,9 @@
This tool was designed by Frey @ ATSMUSH. It is based on MapView for ATS with data used from the Navcomp MUSHClient plugin with permission. Change Log :
+

+ 1-9-2018: Add simple websocket based client to desktop & tablet version (for now until I can figure mobile out). Thanks to grapenut@M*U*S*H for the client code and all others on the PennMUSH dev team involved in adding websockets to the codebase. +

6-14-2017: Improve resposiveness in design. It wasn't scaling down well, should be better now. Not glorious, but better. Also, this changelog was added.