37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Redirecting...</title>
|
|
<meta http-equiv="refresh" content="0; URL=ch19-03-pattern-syntax.html">
|
|
<link rel="canonical" href="ch19-03-pattern-syntax.html">
|
|
</head>
|
|
<body>
|
|
<p>Redirecting to... <a href="ch19-03-pattern-syntax.html">ch19-03-pattern-syntax.html</a>.</p>
|
|
|
|
<script>
|
|
// This handles redirects that involve fragments.
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const fragmentMap =
|
|
{}
|
|
;
|
|
const fragment = window.location.hash;
|
|
if (fragment) {
|
|
let redirectUrl = "ch19-03-pattern-syntax.html";
|
|
const target = fragmentMap[fragment];
|
|
if (target) {
|
|
let url = new URL(target, window.location.href);
|
|
redirectUrl = url.href;
|
|
} else {
|
|
let url = new URL(redirectUrl, window.location.href);
|
|
url.hash = window.location.hash;
|
|
redirectUrl = url.href;
|
|
}
|
|
window.location.replace(redirectUrl);
|
|
}
|
|
// else redirect handled by http-equiv
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|