dumb/static/script.js

19 lines
502 B
JavaScript
Raw Normal View History

const fullAbout = document.querySelector("#about #full_about")
const summary = document.querySelector("#about #summary")
function showAbout() {
summary.classList.toggle("hidden")
fullAbout.classList.toggle("hidden")
}
[fullAbout, summary].forEach(item => item.onclick = showAbout)
document.querySelectorAll("#lyrics a").forEach(item => {
2022-06-30 20:32:56 +00:00
item.addEventListener("click", getAnnotation)
})
function getAnnotation(e) {
e.preventDefault()
console.log(e.target.parentElement.getAttribute("href"))
2022-06-30 20:32:56 +00:00
}