From 98ec522dd6f2d5a60edd5bfeea4d1aa9c26660cf Mon Sep 17 00:00:00 2001 From: Justin Date: Mon, 27 Jun 2022 17:08:26 +0800 Subject: [PATCH] change back to standard scrolling after reset --- static/app.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/static/app.js b/static/app.js index 6257686..819aa07 100755 --- a/static/app.js +++ b/static/app.js @@ -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") {