1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-11-24 16:37:30 +00:00
cloudtube/html/static/js/focus.js
2020-08-31 01:54:59 +12:00

12 lines
269 B
JavaScript

document.body.classList.remove("show-focus")
document.addEventListener("mousedown", () => {
document.body.classList.remove("show-focus")
})
document.addEventListener("keydown", event => {
if (event.key === "Tab") {
document.body.classList.add("show-focus")
}
})