Skip to content

Commit

Permalink
Support spec/1.2/index.html redirect and no JS
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Nov 17, 2021
1 parent e3196d8 commit a860a24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/1.2/spec.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<html>
<head>
<meta http-equiv="refresh" content="2; url=/spec/1.2.2/" />
<script>
var m;
var href = window.location.href;

if (m = href.match(/\/spec\/1\.2\/?(?:spec\.html)?(#[a-z].+)/)) {
if (m = href.match(/\/spec\/1\.2\/?(?:spec\.html|index\.html)?(#[a-z].+)/)) {
window.location.href = `/spec/1.2-old/spec.html${m[1]}`;
}
else {
Expand Down

0 comments on commit a860a24

Please sign in to comment.