Send /v/<code> to the watch page
The host serves this file for any extensionless path it does not recognise, so /v/<code> lands here rather than at v/index.html. Four lines at the top of the head hand it on before anything renders. Deliberately the first thing in the head and wrapped in a try, so a share link resolves before any paint and a failure here can never take the homepage down with it.
This commit is contained in:
parent
789c4fef55
commit
a82e95d9cc
1 changed files with 9 additions and 0 deletions
|
|
@ -1,6 +1,15 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
|
<script>
|
||||||
|
/* This file is served for any extensionless path the host does not recognise,
|
||||||
|
so a share link at /v/<code> arrives here. Hand it on before anything is
|
||||||
|
painted. Wrapped so that a failure can never take the home page with it. */
|
||||||
|
try {
|
||||||
|
var __m = location.pathname.match(/^\/v\/([0-9a-fA-F]{6,12})\/?$/);
|
||||||
|
if (__m) location.replace("/v/index.html?c=" + __m[1] + location.hash);
|
||||||
|
} catch (e) {}
|
||||||
|
</script>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>PayToLaugh — Dog-In Podcast</title>
|
<title>PayToLaugh — Dog-In Podcast</title>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue