MORE REFACTORING!! + some improvements
Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
parent
151b2d8fd9
commit
cba791deba
17 changed files with 376 additions and 223 deletions
|
@ -1,7 +1,12 @@
|
|||
import "./main.js";
|
||||
|
||||
document.addEventListener("swap", () => {
|
||||
document.querySelectorAll("h1.music-title").forEach(element => {
|
||||
element.href = "";
|
||||
});
|
||||
document.querySelectorAll("div.music").forEach(container => {
|
||||
const link = container.querySelector(".music-title a").href
|
||||
|
||||
container.addEventListener("click", event => {
|
||||
if (event.target.href) return;
|
||||
|
||||
event.preventDefault();
|
||||
location = link;
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue