From 836fef97e7162b8d3777528788ccf0d9a6ecbd21 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Sat, 8 Oct 2016 12:59:01 +0200 Subject: add feature detection --- public/javascripts/main.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'public/javascripts/main.js') 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 -- cgit v1.1