From 07a3e3cc21efa243042b2b4cba618bd5857d8fef Mon Sep 17 00:00:00 2001 From: calzoneman Date: Thu, 8 Aug 2013 18:25:56 -0400 Subject: [PATCH] A few minor changes - Fix paginator always showing 5 buttons even if there are less pages - Clear AFK timer when clicking voteskip - Change the modestbranding youtube param because people wanted the like/dislike buttons --- channel.js | 5 ++--- www/assets/js/paginator.js | 2 +- www/assets/js/player.js | 1 - www/assets/js/util.js | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/channel.js b/channel.js index cb50d1c6..edbf163e 100644 --- a/channel.js +++ b/channel.js @@ -1516,9 +1516,8 @@ Channel.prototype.tryVoteskip = function(user) { return; } // Voteskip = auto-unafk - if(user.meta.afk) { - user.setAFK(false); - } + user.setAFK(false); + user.autoAFK(); if(!this.voteskip) { this.voteskip = new Poll("voteskip", "voteskip", ["yes"]); } diff --git a/www/assets/js/paginator.js b/www/assets/js/paginator.js index efaa6ad6..e2fcac53 100644 --- a/www/assets/js/paginator.js +++ b/www/assets/js/paginator.js @@ -48,7 +48,7 @@ .appendTo(sep); } } - for(var i = s; i < s + this.opts.maxPages; i++) { + for(var i = s; i < s + this.opts.maxPages && i < s + pages; i++) { (function (i) { var li = $("
  • ").appendTo(ul); if(i == p) diff --git a/www/assets/js/player.js b/www/assets/js/player.js index 40661b5c..ca451fc7 100644 --- a/www/assets/js/player.js +++ b/www/assets/js/player.js @@ -37,7 +37,6 @@ var YouTubePlayer = function (data) { autoplay: 1, // Autoplay video controls: 1, // Show controls iv_load_policy: 3, // No annotations - modestbranding: 1, // No logo rel: 0, // No related videos wmode: wmode }, diff --git a/www/assets/js/util.js b/www/assets/js/util.js index b2aae050..91a70f55 100644 --- a/www/assets/js/util.js +++ b/www/assets/js/util.js @@ -1499,12 +1499,12 @@ function genPermissionsEditor() { makeOption("Jump to video", "playlistjump", standard, CHANNEL.perms.playlistjump+""); makeOption("Queue playlist", "playlistaddlist", standard, CHANNEL.perms.playlistaddlist+""); makeOption("Queue livestream", "playlistaddlive", standard, CHANNEL.perms.playlistaddlive+""); + makeOption("Embed custom media", "playlistaddcustom", standard, CHANNEL.perms.playlistaddcustom + ""); makeOption("Exceed maximum media length", "exceedmaxlength", standard, CHANNEL.perms.exceedmaxlength+""); makeOption("Add nontemporary media", "addnontemp", standard, CHANNEL.perms.addnontemp+""); makeOption("Temp/untemp playlist item", "settemp", standard, CHANNEL.perms.settemp+""); makeOption("Shuffle playlist", "playlistshuffle", standard, CHANNEL.perms.playlistshuffle+""); makeOption("Clear playlist", "playlistclear", standard, CHANNEL.perms.playlistclear+""); - makeOption("Embed custom media", "playlistaddcustom", standard, CHANNEL.perms.playlistaddcustom + ""); addDivider("Polls"); makeOption("Open/Close poll", "pollctl", modleader, CHANNEL.perms.pollctl+"");