more options for nochan socket

This commit is contained in:
Kasper Rynning-Tønnesen
2015-11-27 15:33:03 +01:00
parent 3d4d7e2b16
commit eaf8dd7967
4 changed files with 11 additions and 5 deletions

View File

@@ -44,9 +44,9 @@ var connection_options = {
'secure': true
};
if(window.location.hostname == "zoff.no") add = "dev.zoff.no";
if(window.location.hostname == "zoff.no") add = "https://dev.zoff.no";
else add = "localhost";
var socket = io.connect('https://'+add+':8880', connection_options);
var socket = io.connect(''+add+':8880', connection_options);
socket.on("get_list", function(){
socket.emit('list', chan.toLowerCase());
});

View File

@@ -178,7 +178,13 @@ $(document).ready(function (){
window.list_html = list_html;
$("#channels").empty();
var socket = io.connect('https://'+window.location.hostname+':8880');
var connection_options = {
'secure': true
};
if(window.location.hostname == "zoff.no") add = "https://dev.zoff.no";
else add = "localhost";
var socket = io.connect(''+add+':8880', connection_options);
socket.emit('frontpage_lists');
socket.on('playlists', function(msg){
Nochan.populate_channels(msg);