Skip to content

Commit cefbf17

Browse files
committed
redirect previously versioned scratch url to new one
1 parent c53f128 commit cefbf17

5 files changed

+26
-7
lines changed

js/index.js

+11-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ const {
2222
} = require('./utils');
2323

2424
const {
25+
getHashValue,
26+
getParameterByName,
2527
getPath
2628
} = require('./server/helpers');
2729

@@ -71,5 +73,13 @@ $(() => {
7173
app.setWikiList(data.wikis);
7274

7375
DOM.showWiki('Tracer');
74-
})
76+
});
77+
78+
var v1LoadedScratch = getHashValue('scratch-paper');
79+
var v2LoadedScratch = getParameterByName('scratch-paper');
80+
var vLoadedScratch = v1LoadedScratch || v2LoadedScratch;
81+
if (vLoadedScratch) {
82+
window.location.href = window.location.protocol + '//' + window.location.host + window.location.pathname + '#path=scratch/' + vLoadedScratch;
83+
}
84+
7585
});

public/algorithm_visualizer.js

+10-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/algorithm_visualizer.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/algorithm_visualizer.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/algorithm_visualizer.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)