clean code

This commit is contained in:
Matthis FAUVET 2024-06-21 01:28:13 +02:00
parent 667e57b80e
commit e79a8bcd7d

View File

@ -24,12 +24,8 @@
},
click(e) {
e.preventDefault();
document.getElementById("song").style.backgroundColor = "#D1FAE5";
document.getElementById("song").style.borderColor = "#6EE7B7";
document.getElementById("album").style.backgroundColor = "#D1FAE5";
document.getElementById("album").style.borderColor = "#6EE7B7";
document.getElementById("artist").style.backgroundColor = "#D1FAE5";
document.getElementById("artist").style.borderColor = "#6EE7B7";
this.clearButton();
switch (e.target.attributes.value.value) {
case 'Songs':
@ -48,6 +44,14 @@
document.getElementById("album").style.borderColor = "#059669";
};
this.update();
},
clearButton() {
document.getElementById("song").style.backgroundColor = "#D1FAE5";
document.getElementById("song").style.borderColor = "#6EE7B7";
document.getElementById("album").style.backgroundColor = "#D1FAE5";
document.getElementById("album").style.borderColor = "#6EE7B7";
document.getElementById("artist").style.backgroundColor = "#D1FAE5";
document.getElementById("artist").style.borderColor = "#6EE7B7";
}
}
</script>