aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/featureDetect.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-09-13 16:28:53 +0200
committerNoah Loomans <noahloomans@gmail.com>2017-09-13 16:28:53 +0200
commit3fb86482404e11942cd83c3500a297a3991db0e4 (patch)
treec5e7261de72c2b7f871580784525d06d036a6219 /public/javascripts/featureDetect.js
parent5aac32f72eca8c66e879583ce653d07bb3c7370f (diff)
Restructure project
Diffstat (limited to 'public/javascripts/featureDetect.js')
-rw-r--r--public/javascripts/featureDetect.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/public/javascripts/featureDetect.js b/public/javascripts/featureDetect.js
deleted file mode 100644
index 3a072a1..0000000
--- a/public/javascripts/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