mirror of https://github.com/calzoneman/sync.git
Fix hidePlayer()
This commit is contained in:
parent
0044057287
commit
06347d6c25
|
@ -15,7 +15,7 @@ html(lang="en")
|
||||||
ul.nav.navbar-nav
|
ul.nav.navbar-nav
|
||||||
mixin navdefaultlinks(cname)
|
mixin navdefaultlinks(cname)
|
||||||
li: a(href="javascript:void(0)", onclick="javascript:showUserOptions()") Options
|
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
|
li.dropdown
|
||||||
a.dropdown-toggle(href="#", data-toggle="dropdown") Layout
|
a.dropdown-toggle(href="#", data-toggle="dropdown") Layout
|
||||||
b.caret
|
b.caret
|
||||||
|
|
|
@ -1910,30 +1910,13 @@ function waitUntilDefined(obj, key, fn) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidePlayer() {
|
function hidePlayer() {
|
||||||
if(!PLAYER)
|
if (!PLAYER) return;
|
||||||
return;
|
|
||||||
|
|
||||||
if(!/(chrome|MSIE)/ig.test(navigator.userAgent))
|
$("#ytapiplayer").hide();
|
||||||
return;
|
|
||||||
|
|
||||||
PLAYER.size = {
|
|
||||||
width: $("#ytapiplayer").width(),
|
|
||||||
height: $("#ytapiplayer").height()
|
|
||||||
};
|
|
||||||
|
|
||||||
$("#ytapiplayer").attr("width", 1)
|
|
||||||
.attr("height", 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function unhidePlayer() {
|
function unhidePlayer() {
|
||||||
if(!PLAYER)
|
$("#ytapiplayer").show();
|
||||||
return;
|
|
||||||
|
|
||||||
if(!/(chrome|MSIE)/ig.test(navigator.userAgent))
|
|
||||||
return;
|
|
||||||
|
|
||||||
$("#ytapiplayer").width(PLAYER.size.width)
|
|
||||||
.height(PLAYER.size.height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function chatDialog(div) {
|
function chatDialog(div) {
|
||||||
|
@ -2963,3 +2946,12 @@ EmoteList.prototype.loadPage = function (page) {
|
||||||
};
|
};
|
||||||
|
|
||||||
window.EMOTELIST = new EmoteList();
|
window.EMOTELIST = new EmoteList();
|
||||||
|
|
||||||
|
function showChannelSettings() {
|
||||||
|
hidePlayer();
|
||||||
|
$("#channeloptions").on("hidden.bs.modal", function () {
|
||||||
|
unhidePlayer();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#channeloptions").modal();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue