You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
501 B
20 lines
501 B
function getBaseUrl() {
|
|
var ishttps = 'https:' == document.location.protocol ? true : false;
|
|
var url = window.location.host;
|
|
if (ishttps) {
|
|
url = 'https://' + url;
|
|
} else {
|
|
url = 'http://' + url;
|
|
}
|
|
return url;
|
|
}
|
|
function getWsBaseUrl() {
|
|
var ishttps = 'https:' == document.location.protocol ? true : false;
|
|
var url = window.location.host;
|
|
if (ishttps) {
|
|
url = 'wss://' + url;
|
|
} else {
|
|
url = 'ws://' + url;
|
|
}
|
|
return url;
|
|
} |