Commit 50f582c3 authored by Charlie Melidosian's avatar Charlie Melidosian

down page updates and schedule JS changes

parent 0fa2dfa5
<<?php
<?php
$down = false;
if(!isset($_GET['dev']) || $down)
if(isset($_GET['dev']))
{
echo "dev mode enabled"
}
else if($down)
{
header("Location: /down.html"); /* Redirect browser */
exit();
......
<<?php
<?php
$down = false;
if(!isset($_GET['dev']) || $down)
if(isset($_GET['dev']))
{
echo "dev mode enabled"
}
else if($down)
{
header("Location: /down.html"); /* Redirect browser */
exit();
......
......@@ -173,8 +173,19 @@ function WebSocketTest()
{
if ("WebSocket" in window)
{
var ws = new WebSocket("ws://southschedule.net:8080");
ws.onopen = function()
console.log(window.location.hostname);
if(window.location.hostname == "dev.southschedule.net")
{
var ws = new WebSocket("ws://backend.southschedule.net:9090");
}
else if (window.location.hostname == "local.southschedule.net") {
var ws = new WebSocket("ws://local.southschedule.net:9090");
}
else {
var ws = new WebSocket("ws://backend.southschedule.net:8080");
}
ws.onopen = function()
{
checkConn(ws);
ws.send("allschedules");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment