Fix confusion in theme picker functions
This commit is contained in:
parent
7858dc237d
commit
3375b05cd0
2 changed files with 14 additions and 14 deletions
|
@ -876,22 +876,22 @@ r#"var themes = document.getElementById("theme-choices");
|
||||||
var themePicker = document.getElementById("theme-picker");
|
var themePicker = document.getElementById("theme-picker");
|
||||||
|
|
||||||
function showThemeButtonState() {{
|
function showThemeButtonState() {{
|
||||||
themes.style.display = "none";
|
|
||||||
themePicker.style.borderBottomRightRadius = "3px";
|
|
||||||
themePicker.style.borderBottomLeftRadius = "3px";
|
|
||||||
}}
|
|
||||||
|
|
||||||
function hideThemeButtonState() {{
|
|
||||||
themes.style.display = "block";
|
themes.style.display = "block";
|
||||||
themePicker.style.borderBottomRightRadius = "0";
|
themePicker.style.borderBottomRightRadius = "0";
|
||||||
themePicker.style.borderBottomLeftRadius = "0";
|
themePicker.style.borderBottomLeftRadius = "0";
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
function hideThemeButtonState() {{
|
||||||
|
themes.style.display = "none";
|
||||||
|
themePicker.style.borderBottomRightRadius = "3px";
|
||||||
|
themePicker.style.borderBottomLeftRadius = "3px";
|
||||||
|
}}
|
||||||
|
|
||||||
function switchThemeButtonState() {{
|
function switchThemeButtonState() {{
|
||||||
if (themes.style.display === "block") {{
|
if (themes.style.display === "block") {{
|
||||||
showThemeButtonState();
|
|
||||||
}} else {{
|
|
||||||
hideThemeButtonState();
|
hideThemeButtonState();
|
||||||
|
}} else {{
|
||||||
|
showThemeButtonState();
|
||||||
}}
|
}}
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|
|
@ -105,9 +105,9 @@ if (!DOMTokenList.prototype.remove) {
|
||||||
sidebar.appendChild(div);
|
sidebar.appendChild(div);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var themePicker = document.getElementsByClassName("theme-picker");
|
var themePickers = document.getElementsByClassName("theme-picker");
|
||||||
if (themePicker && themePicker.length > 0) {
|
if (themePickers && themePickers.length > 0) {
|
||||||
themePicker[0].style.display = "none";
|
themePickers[0].style.display = "none";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,9 +123,9 @@ if (!DOMTokenList.prototype.remove) {
|
||||||
filler.remove();
|
filler.remove();
|
||||||
}
|
}
|
||||||
document.getElementsByTagName("body")[0].style.marginTop = "";
|
document.getElementsByTagName("body")[0].style.marginTop = "";
|
||||||
var themePicker = document.getElementsByClassName("theme-picker");
|
var themePickers = document.getElementsByClassName("theme-picker");
|
||||||
if (themePicker && themePicker.length > 0) {
|
if (themePickers && themePickers.length > 0) {
|
||||||
themePicker[0].style.display = null;
|
themePickers[0].style.display = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue