mirror of https://github.com/PiyushXCoder/lupt.git
wss support
This commit is contained in:
parent
f5bfea5b3e
commit
9da8d1ccd0
|
|
@ -18,7 +18,7 @@
|
|||
text-align: center;
|
||||
">
|
||||
<img src="img/loading.svg" style="height: 100%;">
|
||||
<button class="button" onclick="leave()">Close</button>
|
||||
<button id="progress_button" class="button is-hidden" onclick="leave()">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Connect Screen -->
|
||||
|
|
|
|||
|
|
@ -247,7 +247,11 @@ $(document).ready(() => {
|
|||
});
|
||||
|
||||
// Create WebSocket connection.
|
||||
const socket = new WebSocket('ws://'+window.location.host+'/ws/');
|
||||
var wsProtocol = 'ws://';
|
||||
if (window.location.protocol === 'https:') {
|
||||
wsProtocol = 'wss://';
|
||||
}
|
||||
const socket = new WebSocket(wsProtocol+window.location.host+'/ws/');
|
||||
var myinfo = {
|
||||
kunjika: "",
|
||||
name: ""
|
||||
|
|
@ -258,6 +262,8 @@ var no_name_message = false;
|
|||
|
||||
// Connection opened
|
||||
socket.addEventListener('open', function (event) {
|
||||
$('#progress_button').removeClass('is-hidden');
|
||||
|
||||
var params = window.location.search;
|
||||
params = params.substr(1,params.length).split('&');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue