<!DOCTYPE html>
<html>
<head>
<script>
var loc = location.href;
if (loc.match('/blockly/')) {
loc = loc.replace('/blockly/', '/static/');
}
if (loc.match(/\/demos\/(maze|turtle)\//)) {
loc = loc.replace('/demos/', '/apps/');
}
if (loc.match('/vn.html')) {
loc = loc.replace('/vn.html', '/vi.html');
}
if (loc.match('/code/code.html')) {
loc = loc.replace('/code.html', '/index.html');
} else if (loc.match('/apps/code/zh_tw.html')) {
loc = loc.replace('/zh_tw.html', '/index.html?lang=zh-hans');
} else if (loc.match('/apps/code/index.html')) {
} else if (loc.match(/\/apps\/code\/[-a-z]+\.html/)) {
loc = loc.replace(/\/([-a-z]+)\.html/, '/index.html?lang=$1');
}
if (loc.match('/apps/plane/plane.html')) {
loc = loc.replace('/plane.html', '/index.html');
} else if (loc.match('/apps/code/plane.html')) {
} else if (loc.match(/\/apps\/plane\/[\d_]*[-a-z]+\.html/)) {
loc = loc.replace('vn.html', 'vi.html');
if (location.search) {
loc = loc.replace(/\/[\d_]*([-a-z]+)\.html\?/, '/index.html?lang=$1&');
} else {
loc = loc.replace(/\/[\d_]*([-a-z]+)\.html/, '/index.html?lang=$1');
}
}
if (loc.includes('/apps/puzzle/')) {
loc = 'https://blockly.games/puzzle';
} else if (loc.includes('/apps/maze/')) {
loc = 'https://blockly.games/maze';
} else if (loc.includes('/apps/turtle/')) {
loc = 'https://blockly.games/turtle';
} else if (loc.includes('/apps/')) {
loc = loc.replace('/apps/', '/demos/');
}
if (loc.includes('/demos/fixed/')) {
loc = 'https://google.github.io/blockly-samples/examples/fixed-demo/';
} else if (loc.includes('/demos/resizable/overlay')) {
loc = 'https://google.github.io/blockly-samples/examples/resizable-demo/overlay.html';
} else if (loc.includes('/demos/resizable/')) {
loc = 'https://google.github.io/blockly-samples/examples/resizable-demo/';
} else if (loc.includes('/demos/toolbox/')) {
loc = 'https://google.github.io/blockly-samples/examples/toolbox-demo/';
} else if (loc.includes('/demos/maxBlocks/')) {
loc = 'https://google.github.io/blockly-samples/examples/max-blocks-demo/';
} else if (loc.includes('/demos/generator/')) {
loc = 'https://google.github.io/blockly-samples/examples/generator-demo/';
} else if (loc.includes('/demos/headless/')) {
loc = 'https://google.github.io/blockly-samples/examples/headless-demo/';
} else if (loc.includes('/demos/interpreter/step-execution')) {
loc = 'https://google.github.io/blockly-samples/examples/interpreter-demo/step-execution.html';
} else if (loc.includes('/demos/interpreter/async-execution')) {
loc = 'https://google.github.io/blockly-samples/examples/interpreter-demo/async-execution.html';
} else if (loc.includes('/demos/graph/')) {
loc = 'https://google.github.io/blockly-samples/examples/graph-demo/';
} else if (loc.includes('/demos/rtl/')) {
loc = 'https://google.github.io/blockly-samples/examples/rtl-demo/';
} else if (loc.includes('/demos/custom-dialogs/')) {
loc = 'https://google.github.io/blockly-samples/examples/custom-dialogs-demo';
} else if (loc.includes('/demos/custom-fields/turtle/')) {
loc = 'https://google.github.io/blockly-samples/examples/turtle-field-demo/';
} else if (loc.includes('/demos/custom-fields/pitch/')) {
loc = 'https://google.github.io/blockly-samples/examples/pitch-field-demo/';
} else if (loc.includes('/demos/mirror/')) {
loc = 'https://google.github.io/blockly-samples/examples/mirror-demo/';
} else if (loc.includes('/demos/plane/')) {
loc = 'https://google.github.io/blockly-samples/examples/plane-demo/';
} else if (loc.includes('/demos/keyboard_nav/')) {
loc = 'https://google.github.io/blockly-samples/plugins/keyboard-navigation/test/';
} else if (loc.includes('/demos/custom-fields/')) {
loc = 'https://google.github.io/blockly-samples/examples/pitch-field-demo/';
}
location = loc;
</script>
</head>
</html>