mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fewer channels on frontpage, fixed clearing channels on full round, working input for channel search on mobile webapp
This commit is contained in:
@@ -53,7 +53,7 @@ var Nochan = {
|
||||
{
|
||||
|
||||
var chan = lists[x][3];
|
||||
if(num<16)
|
||||
if(num<12)
|
||||
{
|
||||
var id = lists[x][1];
|
||||
var viewers = lists[x][0];
|
||||
@@ -171,7 +171,7 @@ var Nochan = {
|
||||
|
||||
}
|
||||
setTimeout(function(){
|
||||
if(Nochan.times_rotated == 50 && frontpage){
|
||||
if(Nochan.times_rotated == 2 && frontpage){
|
||||
Nochan.times_rotated = 0;
|
||||
socket.emit("frontpage_lists");
|
||||
}else if(frontpage){
|
||||
@@ -270,12 +270,19 @@ String.prototype.capitalizeFirstLetter = function() {
|
||||
$().ready(initfp);
|
||||
|
||||
function initfp(){
|
||||
channel_list = $("#channel-list-container").html();
|
||||
|
||||
var connection_options = {
|
||||
'secure': true,
|
||||
'force new connection': true
|
||||
};
|
||||
|
||||
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
||||
else add = "localhost";
|
||||
socket = io.connect(''+add+':8880', connection_options);
|
||||
socket.emit('frontpage_lists');
|
||||
socket.on('playlists', function(msg){
|
||||
$("#channels").empty();
|
||||
|
||||
Nochan.populate_channels(msg.channels);
|
||||
|
||||
@@ -289,15 +296,8 @@ function initfp(){
|
||||
window.location.hash = "#";
|
||||
$('#donation').openModal()
|
||||
}
|
||||
|
||||
channel_list = $("#channel-list-container").html();
|
||||
//window.channel_list = channel_list;
|
||||
$("#channels").empty();
|
||||
|
||||
var connection_options = {
|
||||
'secure': true,
|
||||
'force new connection': true
|
||||
};
|
||||
|
||||
if(!localStorage["ok_cookie"])
|
||||
Materialize.toast("We're using cookies to enhance your experience! <a class='waves-effect waves-light btn light-green' href='#ok' id='cookieok' style='cursor:pointer;pointer-events:all;'> ok</a>", 10000);
|
||||
@@ -381,3 +381,9 @@ $(document).on('click', '#cookieok', function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).on("submit", "#base", function(e){
|
||||
e.preventDefault();
|
||||
Nochan.to_channel($("#search-mobile").val());
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user