Fix hidePlayer()

This commit is contained in:
calzoneman 2015-07-16 21:43:21 -07:00
parent 0044057287
commit 06347d6c25
2 changed files with 13 additions and 21 deletions

View file

@ -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

View file

@ -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();
}