added option for showing all channels on frontpage, will probably crash stuff

This commit is contained in:
Kasper Rynning-Tønnesen
2017-04-29 16:02:56 +02:00
parent 66987b9339
commit 8bb17343bf
7 changed files with 70 additions and 14 deletions

View File

@@ -16,6 +16,7 @@ var player_ready = false;
var viewers = 1;
var dragging = false;
var paused = false;
var currently_showing_channels = 1;
var playing = false;
var SAMPLE_RATE = 6000; // 6 seconds
var lastSample = Date.now();
@@ -969,6 +970,15 @@ $(document).on('click', "#aprilfools", function(){
$(".mega").css("-moz-transform", "rotate(0deg)");
});
$(document).on('change', '#view_channels_select', function(e) {
var that = this;
if(currently_showing_channels != parseInt(that.value)) {
Frontpage.populate_channels(Frontpage.all_channels, (parseInt(that.value) == 1 ? true : false));
}
currently_showing_channels = parseInt(that.value);
});
$(document).on('keyup mouseup', '#width_embed', function(){
var that = $(this);
embed_width = that.val();