-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.js
40 lines (34 loc) · 1.1 KB
/
popup.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
document.addEventListener("DOMContentLoaded", function () {
const runeCircle = document.querySelector(".rune-circle");
const supportButton = document.getElementById("supportButton");
const qrModal = document.getElementById("qrModal");
const closeModal = document.getElementById("closeModal");
let angle = 0;
function rotateRune() {
angle += 0.2;
runeCircle.style.transform = `translate(-50%, -50%) rotate(${angle}deg)`;
requestAnimationFrame(rotateRune);
}
rotateRune();
const links = document.querySelectorAll(".link");
links.forEach((link) => {
link.addEventListener("mouseover", () => {
link.style.textShadow = "0 0 10px #d4af37";
});
link.addEventListener("mouseout", () => {
link.style.textShadow = "none";
});
});
supportButton.addEventListener("click", (e) => {
e.preventDefault();
qrModal.style.display = "block";
});
closeModal.addEventListener("click", () => {
qrModal.style.display = "none";
});
window.addEventListener("click", (e) => {
if (e.target === qrModal) {
qrModal.style.display = "none";
}
});
});