blob: 3c9093e4f61c5b7f32edc1502939d9224934f1b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
const frontpage = {}
const self = frontpage
self._nodes = {
input: document.querySelector('input[type="search"]')
}
self.isShown = false
self.show = function () {
document.body.classList.add('no-input')
self.isShown = true
}
self.hide = function () {
document.body.classList.remove('no-input')
self.isShown = false
}
self._nodes.input.addEventListener('input', self.hide)
module.exports = frontpage
|