aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/main.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2016-10-08 12:59:01 +0200
committerNoah Loomans <noahloomans@gmail.com>2016-10-08 12:59:01 +0200
commit836fef97e7162b8d3777528788ccf0d9a6ecbd21 (patch)
tree5c036ed20bef312ac6a3854c00566a351a0a2c68 /public/javascripts/main.js
parent0736df257deb67b9d2d7fb44488e36c941876dd6 (diff)
add feature detection
Diffstat (limited to 'public/javascripts/main.js')
-rw-r--r--public/javascripts/main.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/public/javascripts/main.js b/public/javascripts/main.js
index a7b701b..89fb473 100644
--- a/public/javascripts/main.js
+++ b/public/javascripts/main.js
@@ -17,6 +17,16 @@ const nextButton = document.querySelectorAll('input[type="button"]')[1]
const currentWeekNode = document.querySelector('.current')
const favNode = document.querySelector('.fav')
+if (window.location.href.split('?')[1] !== 'nfd') { // nfd = no feature detection
+ if (document.querySelector('#search').getClientRects()[0].height !== 70) {
+ window.location = 'http://www.meetingpointmco.nl/Roosters-AL/doc/'
+ } else {
+ window.onerror = function () {
+ window.location = 'http://www.meetingpointmco.nl/Roosters-AL/doc/'
+ }
+ }
+}
+
let selectedResult = -1
let selectedUser
let results