From acbdba98a7ab37e76c856cc751b78e2a974036b9 Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Sun, 29 Jan 2017 22:08:16 +0100 Subject: Update the page URL when selecting user When you select a user and press the back button of your browser, it will exit out of schedule page instead of going back inside of the app. This is unexpected behavior. This commit will update the URL using history.pushState() when a user is selected. Allowing the browser navigation buttons to nicely integrate with the schedule. --- routes/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routes/index.js') diff --git a/routes/index.js b/routes/index.js index 1ab2ba3..d1f7765 100644 --- a/routes/index.js +++ b/routes/index.js @@ -5,7 +5,7 @@ const router = express.Router() const users = require('../lib/getUserIndex') /* GET home page. */ -router.get('/', function (req, res, next) { +router.get(['/', '/s/*', '/t/*', '/r/*', '/c/*'], function (req, res, next) { let flags = [] if (req.query.nfd != null) { flags.push('NO_FEATURE_DETECT') -- cgit v1.1