diff options
author | Noah Loomans <noahloomans@gmail.com> | 2018-01-29 16:31:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 16:31:05 +0100 |
commit | 694580bc532239a32c2fbf61d7f09e793fd1cb11 (patch) | |
tree | acd21e2654d6c5e70dc41c675972794ce95b4062 /src/client/javascript/featureDetect.js | |
parent | f18692872cdc28d29917247ef4f8ef7553a8b023 (diff) | |
parent | 9a9edd1865d619caada787231c8bb34be25af3af (diff) |
Merge pull request #15 from nloomans/react
Move project over to react
Diffstat (limited to 'src/client/javascript/featureDetect.js')
-rw-r--r-- | src/client/javascript/featureDetect.js | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/client/javascript/featureDetect.js b/src/client/javascript/featureDetect.js deleted file mode 100644 index 3a072a1..0000000 --- a/src/client/javascript/featureDetect.js +++ /dev/null @@ -1,29 +0,0 @@ -/* global FLAGS */ - -const self = {} - -self._nodes = { - input: document.querySelector('input[type="search"]'), - overflowButton: document.querySelector('#overflow-button') -} - -self._shouldCheck = function () { - return FLAGS.indexOf('NO_FEATURE_DETECT') === -1 -} - -self._redirect = function () { - window.location.href = 'http://www.meetingpointmco.nl/Roosters-AL/doc/' -} - -self.check = function () { - if (!self._shouldCheck()) return - - window.onerror = self._redirect - - if (self._nodes.input.getClientRects()[0].top !== - self._nodes.overflowButton.getClientRects()[0].top) { - self._redirect() - } -} - -module.exports = self |