change back to standard scrolling after reset

This commit is contained in:
Justin 2022-06-27 17:08:26 +08:00 committed by GitHub
parent e5a081246a
commit 98ec522dd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1474,6 +1474,23 @@ displayFormatBtn.addEventListener("click", () => {
}
});
// after clicking reset user settings, change back to standard scrolling
let resetSettingsBtn = document.querySelector("#reset-btn")
resetSettingsBtn.addEventListener("click", () => {
selectedDisplayText.innerText = "Standard Scrolling";
localStorage.setItem("displayFormat", "Standard Scrolling");
topRowText.style.display = "none";
bottomRowText.style.display = "none";
secondRow.style.display = "none";
inputScrollSpeedRow.forEach((value) => {
value.parentElement.parentElement.style.display = "none";
});
});
// if selected display text = Professional two rows
if (selectedDisplayText.innerText === "Professional Two Rows") {