1
0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2024-11-22 23:57:30 +00:00
cloudtube/html/static/js/focus.js

12 lines
269 B
JavaScript
Raw Normal View History

2020-08-30 13:54:59 +00:00
document.body.classList.remove("show-focus")
2020-08-22 13:17:31 +00:00
document.addEventListener("mousedown", () => {
document.body.classList.remove("show-focus")
})
document.addEventListener("keydown", event => {
if (event.key === "Tab") {
document.body.classList.add("show-focus")
}
})