From cb9624e5232fb1604d80a8c2a4db01f705fef356 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sat, 13 Apr 2013 12:14:44 -0500 Subject: [PATCH] Scroll playlist to current video --- www/assets/js/callbacks.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/assets/js/callbacks.js b/www/assets/js/callbacks.js index fddd96f0..18b8a6d6 100644 --- a/www/assets/js/callbacks.js +++ b/www/assets/js/callbacks.js @@ -248,6 +248,9 @@ function initCallbacks() { } var linew = $("#queue").children()[data.idx]; $(linew).addClass("alert alert-info"); + $("#queue").scrollTop(0); + var scroll = $(linew).position().top - $("#queue").position().top; + $("#queue").scrollTop(scroll); POSITION = data.idx; if(CHANNELOPTS.allow_voteskip) $("#voteskip").attr("disabled", false);