You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
opt: reduce code
This commit is contained in:
@@ -1,21 +1,18 @@
|
||||
const helpButton = document.getElementById('help-button');
|
||||
const helpOverlay = document.getElementById('help-overlay');
|
||||
const closeHelp = document.getElementById('close-help');
|
||||
const helpList = document.getElementById('help-list');
|
||||
|
||||
// Open help menu
|
||||
helpButton.addEventListener("click", () => {
|
||||
helpOverlay.classList.remove("hide");
|
||||
helpOverlay.style.display = "flex";
|
||||
requestAnimationFrame(() => {
|
||||
helpOverlay.classList.add("show");
|
||||
});
|
||||
document.body.classList.add("no-scroll");
|
||||
helpOverlay.style.display = "flex";
|
||||
setTimeout(() => {
|
||||
helpOverlay.style.opacity = 1;
|
||||
}, 10);
|
||||
});
|
||||
|
||||
const hideHelpOverlay = () => {
|
||||
helpOverlay.classList.remove("show");
|
||||
helpOverlay.classList.add("hide");
|
||||
helpOverlay.style.opacity = 0;
|
||||
document.body.classList.remove("no-scroll");
|
||||
setTimeout(() => {
|
||||
helpOverlay.style.display = "none";
|
||||
|
||||
Reference in New Issue
Block a user