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:
gator 2026-09-09 01:14:31 +00:00
parent 789c4fef55
commit a82e95d9cc

View file

@ -1,6 +1,15 @@
<!doctype html>
<html lang="en">
<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 name="viewport" content="width=device-width, initial-scale=1">
<title>PayToLaugh — Dog-In Podcast</title>