From 06a2785316133360202984f29648dd98bef1e09e Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Fri, 2 Dec 2016 19:37:05 +0100 Subject: added sinterklaas easer egg --- public/javascripts/main.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'public/javascripts/main.js') diff --git a/public/javascripts/main.js b/public/javascripts/main.js index 016a8ee..ce6bcbf 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -7,6 +7,7 @@ const fuzzy = require('fuzzy') const getURLOfUser = require('./getURLOfUser') const removeDiacritics = require('diacritics').remove const getWeek = require('./getWeek') +const easterEggs = require('./easterEggs') const searchNode = document.querySelector('#search') const inputNode = searchNode.querySelector('input[type="text"]') @@ -209,6 +210,7 @@ const currentFav = getCurrentFav() if (currentFav) { selectedUser = currentFav + // console.log('not updating value') inputNode.value = selectedUser.value scheduleIframe.src = getURLOfUser(offset, selectedUser.type, selectedUser.index + 1) updateFavNode() @@ -234,3 +236,5 @@ if (currentFav) { ga('send', { hitType: 'event', eventCategory: 'search fav', eventAction, eventLabel }) }) } + +easterEggs.sinterklaas() -- cgit v1.1 From e4f6924d8e0bfc888190030beb232e9cd79f6522 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Sun, 4 Dec 2016 20:32:51 +0100 Subject: finalized easter egg --- public/javascripts/main.js | 1 - 1 file changed, 1 deletion(-) (limited to 'public/javascripts/main.js') diff --git a/public/javascripts/main.js b/public/javascripts/main.js index ce6bcbf..b4c8f89 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -210,7 +210,6 @@ const currentFav = getCurrentFav() if (currentFav) { selectedUser = currentFav - // console.log('not updating value') inputNode.value = selectedUser.value scheduleIframe.src = getURLOfUser(offset, selectedUser.type, selectedUser.index + 1) updateFavNode() -- cgit v1.1 From aa9d969df0b2aae30d0d6158f41d66f6c797c9a1 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 5 Dec 2016 21:05:23 +0100 Subject: added clean start spage --- public/javascripts/main.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'public/javascripts/main.js') diff --git a/public/javascripts/main.js b/public/javascripts/main.js index b4c8f89..31645e8 100644 --- a/public/javascripts/main.js +++ b/public/javascripts/main.js @@ -1,4 +1,4 @@ -/* global ga */ +/* global ga FLAGS */ require('flexibility') @@ -18,8 +18,7 @@ const nextButton = document.querySelectorAll('input[type="button"]')[1] const currentWeekNode = document.querySelector('.current') const favNode = document.querySelector('.fav') -if (!(window.location.href.split('?')[1] && - window.location.href.split('?')[1].indexOf('nfd') >= 0)) { // nfd = no feature detection +if (FLAGS.indexOf('NO_FEATURE_DETECT') === -1) { if (document.querySelector('#schedule').getClientRects()[0].bottom !== document.body.getClientRects()[0].bottom) { window.location = 'http://www.meetingpointmco.nl/Roosters-AL/doc/' @@ -108,6 +107,7 @@ searchNode.addEventListener('keydown', function (e) { }) searchNode.addEventListener('input', function (e) { + searchNode.className = '' autocompleteNode.innerHTML = '' if (inputNode.value.trim() === '') return @@ -234,6 +234,11 @@ if (currentFav) { ga(function () { ga('send', { hitType: 'event', eventCategory: 'search fav', eventAction, eventLabel }) }) +} else if (inputNode.value === '') { + searchNode.className = 'no-input' + inputNode.focus() } -easterEggs.sinterklaas() +document.body.style = '' + +window.easterEggs = easterEggs -- cgit v1.1