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;
|
text-align: center;
|
||||||
">
|
">
|
||||||
<img src="img/loading.svg" style="height: 100%;">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<!-- Connect Screen -->
|
<!-- Connect Screen -->
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,11 @@ $(document).ready(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create WebSocket connection.
|
// 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 = {
|
var myinfo = {
|
||||||
kunjika: "",
|
kunjika: "",
|
||||||
name: ""
|
name: ""
|
||||||
|
|
@ -258,6 +262,8 @@ var no_name_message = false;
|
||||||
|
|
||||||
// Connection opened
|
// Connection opened
|
||||||
socket.addEventListener('open', function (event) {
|
socket.addEventListener('open', function (event) {
|
||||||
|
$('#progress_button').removeClass('is-hidden');
|
||||||
|
|
||||||
var params = window.location.search;
|
var params = window.location.search;
|
||||||
params = params.substr(1,params.length).split('&');
|
params = params.substr(1,params.length).split('&');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue