mirror of https://github.com/calzoneman/sync.git
Replace userlist visibility check logic (#859)
* Replace visibility check logic JQuery queries using getComputedStyle, which makes it impossible to change userlist behavior using CSS. This replaces the check with a direct style="" value check so the JS does not trip up if any CSS customizations to the list visibility were made. Co-authored-by: Algoinde <algoinde@gmail.com>
This commit is contained in:
parent
f2adbe18da
commit
88365612da
|
@ -15,7 +15,7 @@ $(window).focus(CyTube.ui.onPageFocus).blur(CyTube.ui.onPageBlur);
|
|||
$(".modal").focus(CyTube.ui.onPageFocus);
|
||||
|
||||
$("#togglemotd").click(function () {
|
||||
var hidden = $("#motd").css("display") === "none";
|
||||
var hidden = $("#motd")[0].style.display === "none";
|
||||
$("#motd").toggle();
|
||||
if (hidden) {
|
||||
$("#togglemotd").find(".glyphicon-plus")
|
||||
|
@ -817,7 +817,7 @@ $("#cs-emotes-import").click(function () {
|
|||
|
||||
var toggleUserlist = function () {
|
||||
var direction = !USEROPTS.layout.match(/synchtube/) ? "glyphicon-chevron-right" : "glyphicon-chevron-left"
|
||||
if ($("#userlist").css("display") === "none") {
|
||||
if ($("#userlist")[0].style.display === "none") {
|
||||
$("#userlist").show();
|
||||
$("#userlisttoggle").removeClass(direction).addClass("glyphicon-chevron-down");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue