clean code
This commit is contained in:
parent
667e57b80e
commit
e79a8bcd7d
16
onzer.riot
16
onzer.riot
@ -24,12 +24,8 @@
|
|||||||
},
|
},
|
||||||
click(e) {
|
click(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
document.getElementById("song").style.backgroundColor = "#D1FAE5";
|
|
||||||
document.getElementById("song").style.borderColor = "#6EE7B7";
|
this.clearButton();
|
||||||
document.getElementById("album").style.backgroundColor = "#D1FAE5";
|
|
||||||
document.getElementById("album").style.borderColor = "#6EE7B7";
|
|
||||||
document.getElementById("artist").style.backgroundColor = "#D1FAE5";
|
|
||||||
document.getElementById("artist").style.borderColor = "#6EE7B7";
|
|
||||||
|
|
||||||
switch (e.target.attributes.value.value) {
|
switch (e.target.attributes.value.value) {
|
||||||
case 'Songs':
|
case 'Songs':
|
||||||
@ -48,6 +44,14 @@
|
|||||||
document.getElementById("album").style.borderColor = "#059669";
|
document.getElementById("album").style.borderColor = "#059669";
|
||||||
};
|
};
|
||||||
this.update();
|
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>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user