diff options
author | BuildTools <Noah Loomans> | 2017-01-07 22:37:16 +0100 |
---|---|---|
committer | BuildTools <Noah Loomans> | 2017-01-07 22:37:16 +0100 |
commit | 549364fb691f7f092223e186033a8138c3ead2fd (patch) | |
tree | bec1b0bbc972a08ff69464853190044780eb667d /public/javascripts/frontpage.js | |
parent | 4e8da42863406764a659a7337e774ad216d356c9 (diff) | |
parent | a5238353ab86923bb3911e0bf2886ebcb53dfbd2 (diff) |
Merge branch '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 |