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 --- routes/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'routes') diff --git a/routes/index.js b/routes/index.js index 07192b7..bc0a936 100644 --- a/routes/index.js +++ b/routes/index.js @@ -4,11 +4,13 @@ const users = require('../lib/getUserIndex') /* GET home page. */ router.get('/', function (req, res, next) { - if (req.query.v === 'n') { - res.render('index', { version: 'new', users: users.users }) - } else { - res.render('index', { version: 'old', users: users.users }) + let flags = [] + if (req.query.nfd != null) { + flags.push('NO_FEATURE_DETECT') } + + const flagsStr = `var FLAGS = [${flags.map(flag => `"${flag}"`).toString(', ')}];` + res.render('index', { flagsStr, users: users.users }) }) module.exports = router -- cgit v1.1 From 9d94ae11c13d8bcff23eac725c2d7bae2a7872a9 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 5 Dec 2016 21:35:01 +0100 Subject: fixed strict mode --- routes/index.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'routes') diff --git a/routes/index.js b/routes/index.js index bc0a936..8b31ad5 100644 --- a/routes/index.js +++ b/routes/index.js @@ -1,3 +1,5 @@ +'use strict' + const express = require('express') const router = express.Router() const users = require('../lib/getUserIndex') -- cgit v1.1