aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/main.js
diff options
context:
space:
mode:
authorBuildTools <unconfigured@null.spigotmc.org>2016-12-05 21:05:23 +0100
committerBuildTools <unconfigured@null.spigotmc.org>2016-12-05 21:05:23 +0100
commitaa9d969df0b2aae30d0d6158f41d66f6c797c9a1 (patch)
tree73c7d97dce68b37fc6043ae3ba56aa2c9455790d /public/javascripts/main.js
parent3832b1af9194b73ba9b482ee706b94f2c7992bab (diff)
added clean start spage
Diffstat (limited to 'public/javascripts/main.js')
-rw-r--r--public/javascripts/main.js13
1 files changed, 9 insertions, 4 deletions
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