Route flavours ~ URLs

This commit is contained in:
kibigo!
2017-12-10 23:59:04 -08:00
parent 08b0861b96
commit a634d3876f
10 changed files with 30 additions and 25 deletions

View File

@@ -12,8 +12,8 @@ function main() {
if (window.history && history.replaceState) {
const { pathname, search, hash } = window.location;
const path = pathname + search + hash;
if (!(/^\/web[$/]/).test(path)) {
history.replaceState(null, document.title, `/web${path}`);
if (!(/^\/\$glitch[$/]/).test(path)) {
history.replaceState(null, document.title, `/$glitch${path}`);
}
}