From 6e14380fd2b0694adf21915d65e40a0984df1e64 Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Thu, 20 Nov 2014 17:23:05 -0800 Subject: [PATCH] Fix redirect on Code demo. --- appengine/app.yaml | 2 +- appengine/redirect.html | 6 +++--- demos/code/code.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/appengine/app.yaml b/appengine/app.yaml index 84a0a6e61..df6d8bfc2 100644 --- a/appengine/app.yaml +++ b/appengine/app.yaml @@ -11,7 +11,7 @@ handlers: static_files: redirect.html upload: redirect.html # Code, Maze and Turtle moved from demos on 29 Dec 2012. -- url: /static/demos/(code|maze|turtle)/.* +- url: /static/demos/(maze|turtle)/.* static_files: redirect.html upload: redirect.html # Apps was disbanded on 20 Nov 2014. diff --git a/appengine/redirect.html b/appengine/redirect.html index 55e083544..9c29bac59 100644 --- a/appengine/redirect.html +++ b/appengine/redirect.html @@ -9,8 +9,8 @@ if (loc.match('/blockly/')) { loc = loc.replace('/blockly/', '/static/'); } -// Code, Maze and Turtle moved from demos to apps on 29 Dec 2012. -if (loc.match(/\/demos\/(code|maze|turtle)\//)) { +// Maze and Turtle moved from demos to apps on 29 Dec 2012. +if (loc.match(/\/demos\/(maze|turtle)\//)) { loc = loc.replace('/demos/', '/apps/'); } @@ -19,7 +19,7 @@ if (loc.match('/vn.html')) { loc = loc.replace('/vn.html', '/vi.html'); } -if (loc.match('/apps/code/code.html')) { +if (loc.match('/code/code.html')) { // Code moved to index.html on 7 Aug 2013. loc = loc.replace('/code.html', '/index.html'); } else if (loc.match('/apps/code/zh_tw.html')) { diff --git a/demos/code/code.js b/demos/code/code.js index 8cdc28c8b..a8c27400a 100644 --- a/demos/code/code.js +++ b/demos/code/code.js @@ -338,7 +338,7 @@ Code.init = function() { BlocklyStorage['LINK_ALERT'] = MSG['linkAlert']; BlocklyStorage['HASH_ERROR'] = MSG['hashError']; BlocklyStorage['XML_ERROR'] = MSG['xmlError']; - BlocklyApps.bindClick(linkButton, BlocklyStorage.link); + Code.bindClick(linkButton, BlocklyStorage.link); } else if (linkButton) { linkButton.className = 'disabled'; }