diff options
author | Noah Loomans <noahloomans@gmail.com> | 2016-12-14 12:57:59 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2016-12-14 12:57:59 +0100 |
commit | 7c4d1ca2d771ee527201ccd6447e70da97ad33be (patch) | |
tree | e151354bb2182d9788c0e2e8e85d560ccb862f3f /public/javascripts/frontpage.js | |
parent | a016343e0a88e1bb46a2deed0b27dda7b6bc7e44 (diff) | |
parent | b7027583efff12e1bd5acdbb4077ab36c5226839 (diff) |
Merge branch 'refactor' into beta
Diffstat (limited to 'public/javascripts/frontpage.js')
-rw-r--r-- | public/javascripts/frontpage.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/public/javascripts/frontpage.js b/public/javascripts/frontpage.js new file mode 100644 index 0000000..17cb539 --- /dev/null +++ b/public/javascripts/frontpage.js @@ -0,0 +1,23 @@ +const browserFixToolkit = require('./browserFixToolkit') + +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(browserFixToolkit.inputEvent, self.hide) + +module.exports = self |