aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-06-18 18:05:49 +0200
committerMirek Kratochvil <exa.exa@gmail.com>2023-06-18 18:05:49 +0200
commitb0c445a6eb0a89e928c745f0bd5dabb9f65d5067 (patch)
tree637c0462fc87cc5629f172b2d6ede92b818f448a
parent6deeb8be82a01e69065014e3920248ab07651319 (diff)
downloadreploy-b0c445a6eb0a89e928c745f0bd5dabb9f65d5067.tar.gz
reploy-b0c445a6eb0a89e928c745f0bd5dabb9f65d5067.tar.bz2
add the legacy redirection tool
-rw-r--r--templates/index.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/templates/index.html b/templates/index.html
index d7eaba0..815e65a 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,6 +1,17 @@
<html>
{{> head.html}}
<body>
+<script>
+// legacy querystring-based shortcut redirection (if you use this anywhere,
+// please try to avoid it; just removing the ? from the URL is a good way to
+// migrate.)
+var shortcut_link = window.location.search
+if(shortcut_link.length > 0 && shortcut_link[0]==='?') {
+ setTimeout(function() {
+ window.location.replace("{{root}}"+shortcut_link.substring(1))
+ }, 1);
+}
+</script>
{{> header.html}}
{{> searchform.html}}
{{> bigcards.html}}