add faq
This commit is contained in:
@@ -50,7 +50,16 @@ $(document).ready(function(){
|
||||
//$('#console').css('height', $(window).height() - $('#console').offset().top - 10);
|
||||
//account for the input box
|
||||
$("#console").focus();
|
||||
let host = 'wss://console.brn.systems:443';
|
||||
//if connection is https, then use wss://
|
||||
if(window.location.protocol == "https:"){
|
||||
var ws_scheme = "wss://";
|
||||
}
|
||||
else{
|
||||
var ws_scheme = "ws://";
|
||||
}
|
||||
//set host to ws_scheme + hostname + port
|
||||
var host = ws_scheme + window.location.hostname + ":" + window.location.port;
|
||||
console.log("connecting to " + host);
|
||||
var socket = io.connect(host);
|
||||
resizeit();
|
||||
//resize it on window resize
|
||||
@@ -84,11 +93,11 @@ $(document).ready(function(){
|
||||
//connect to the server
|
||||
//on connect
|
||||
socket.on('connect', function () {
|
||||
setareacontent("Connected to server");
|
||||
addareacontent("Connected to server");
|
||||
});
|
||||
//on disconnect
|
||||
socket.on('disconnect', function () {
|
||||
setareacontent("Disconnected from server");
|
||||
addareacontent("Disconnected from server");
|
||||
});
|
||||
//on error
|
||||
socket.on('error', function (err) {
|
||||
|
Reference in New Issue
Block a user