diff --git a/controllers/prototype/index.js b/controllers/prototype/index.js index 3f6d4d9..ee39760 100644 --- a/controllers/prototype/index.js +++ b/controllers/prototype/index.js @@ -169,3 +169,7 @@ module.exports.userstudy = function(req, res) { }); }; + +module.exports.next = function(req, res) { + res.redirect('/prototype/game') +}; diff --git a/controllers/prototype/urls.js b/controllers/prototype/urls.js index ef9814c..dd8da62 100644 --- a/controllers/prototype/urls.js +++ b/controllers/prototype/urls.js @@ -9,5 +9,6 @@ module.exports = { '/prototype/coin-creator/:scene': 'clicker', '/prototype/coin-viewer/:scene': 'viewer', '/prototype/coin-checker/:scene': 'checker', - '/user-study': 'userstudy' + '/user-study': 'userstudy', + '/prototype/next': 'next' }; diff --git a/controllers/thankyou/index.js b/controllers/thankyou/index.js index a6a2159..4cb75df 100644 --- a/controllers/thankyou/index.js +++ b/controllers/thankyou/index.js @@ -1,4 +1,8 @@ module.exports.index = function(req, res) { + + req.session = null; + res.locals.session = null; + res.setHeader('Content-Type', 'text/html'); res.render('index.jade', res.locals, function(err, result) { diff --git a/js/l3d/apps/prototype/interactive/main.js b/js/l3d/apps/prototype/interactive/main.js index 9626d10..c3d3bda 100644 --- a/js/l3d/apps/prototype/interactive/main.js +++ b/js/l3d/apps/prototype/interactive/main.js @@ -32,13 +32,20 @@ Coin.onCoinGot = function(coin) { setTimeout(function() { $('#next').show(); $('#next').click(function() { - window.location = '/prototype/game'; - $('#next').unbind('click'); + window.location = '/prototype/next'; }); }, 60*1000); } }; +Coin.onLastCoin = function() { + $('#next').show(); + $('#next').click(function() { + window.location = '/prototype/next'; + }); + +} + function main() { // Main container that holds everything