blob: d789045883c7bdcb5a54ec4b5900a1ea5001779c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
const self = {}
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 = self
|