diff --git a/templates/channel.jade b/templates/channel.jade index 83edc37c..cbfc7266 100644 --- a/templates/channel.jade +++ b/templates/channel.jade @@ -15,7 +15,7 @@ html(lang="en") ul.nav.navbar-nav mixin navdefaultlinks(cname) li: a(href="javascript:void(0)", onclick="javascript:showUserOptions()") Options - li: a#showchansettings(href="javascript:void(0)", onclick="javascript:$('#channeloptions').modal()") Channel Settings + li: a#showchansettings(href="javascript:void(0)", onclick="javascript:showChannelSettings()") Channel Settings li.dropdown a.dropdown-toggle(href="#", data-toggle="dropdown") Layout b.caret diff --git a/www/js/util.js b/www/js/util.js index 332f49b4..e358cd4b 100644 --- a/www/js/util.js +++ b/www/js/util.js @@ -1910,30 +1910,13 @@ function waitUntilDefined(obj, key, fn) { } function hidePlayer() { - if(!PLAYER) - return; + if (!PLAYER) return; - if(!/(chrome|MSIE)/ig.test(navigator.userAgent)) - return; - - PLAYER.size = { - width: $("#ytapiplayer").width(), - height: $("#ytapiplayer").height() - }; - - $("#ytapiplayer").attr("width", 1) - .attr("height", 1); + $("#ytapiplayer").hide(); } function unhidePlayer() { - if(!PLAYER) - return; - - if(!/(chrome|MSIE)/ig.test(navigator.userAgent)) - return; - - $("#ytapiplayer").width(PLAYER.size.width) - .height(PLAYER.size.height); + $("#ytapiplayer").show(); } function chatDialog(div) { @@ -2963,3 +2946,12 @@ EmoteList.prototype.loadPage = function (page) { }; window.EMOTELIST = new EmoteList(); + +function showChannelSettings() { + hidePlayer(); + $("#channeloptions").on("hidden.bs.modal", function () { + unhidePlayer(); + }); + + $("#channeloptions").modal(); +}