-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
24 lines (24 loc) · 904 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
document.addEventListener("DOMContentLoaded", function () {
const bar = document.getElementById("sidebar");
const overflowMenu = document.getElementById("overflow-menu");
const close = document.getElementById("closea");
document.addEventListener("click", function () {
bar.classList.remove("movingbar");
});
document.addEventListener("click", (e) => {
if (e.target.classList.contains("shoot")) {
overflowMenu.classList.add("menu-slide");
} else {
overflowMenu.classList.remove("menu-slide");
}
});
document.addEventListener("mousemove", function (event) {
if (event.clientX <= 5 && bar.classList.contains("movingbar") !== true) {
bar.classList.add("movingbar");
}
});
close.addEventListener("click", function () {
close.parentElement.parentElement.style.display = "none";
localStorage.setItem("macideascloseeee", "closed");
});
});