/ watch / index.html
index.html
 1  <!DOCTYPE html>
 2  <html lang="en">
 3  <head>
 4      <meta charset="UTF-8">
 5      <meta name="viewport" content="width=device-width, initial-scale=1.0">
 6      <title>Redirecting...</title>
 7      <script>
 8          // Get the current URL
 9          const currentUrl = new URL(window.location.href);
10  
11          // Replace /watch/ with /app/ in the path
12          const newPath = currentUrl.pathname.replace(/^\/watch(\/|$)/, '/app$1');
13  
14          // Create the new URL with the updated path while preserving query parameters
15          currentUrl.pathname = newPath;
16  
17          // Log the redirection for debugging
18          console.info(`Redirecting from ${window.location.pathname} to ${newPath} (with query params: ${currentUrl.search})`);
19  
20          // Make sure we're preserving the video index parameter
21          if (currentUrl.searchParams.has('v')) {
22              console.info(`Preserving video index parameter: v=${currentUrl.searchParams.get('v')}`);
23          }
24  
25          // Redirect to the new URL
26          window.location.href = currentUrl.toString();
27      </script>
28      <style>
29          :root {
30              --cursor-butterfly: url('https://img.icons8.com/neon/24/butterfly.png') 12 12, auto;
31          }
32          body {
33              font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
34              background-color: #f9f9f9;
35              color: #333;
36              text-align: center;
37              padding: 50px 20px;
38              margin: 0;
39              line-height: 1.6;
40              cursor: var(--cursor-butterfly);
41          }
42          .container {
43              max-width: 600px;
44              margin: 0 auto;
45              background-color: white;
46              padding: 30px;
47              border-radius: 8px;
48              box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
49          }
50          h1 {
51              margin-top: 0;
52              color: #333;
53          }
54          p {
55              margin-bottom: 20px;
56          }
57          .loader {
58              display: inline-block;
59              width: 50px;
60              height: 50px;
61              border: 3px solid rgba(0, 0, 0, 0.1);
62              border-radius: 50%;
63              border-top-color: #3498db;
64              animation: spin 1s ease-in-out infinite;
65              margin-bottom: 20px;
66          }
67          @keyframes spin {
68              to { transform: rotate(360deg); }
69          }
70          .link {
71              color: #3498db;
72              text-decoration: none;
73              cursor: var(--cursor-butterfly);
74          }
75          .link:hover {
76              text-decoration: underline;
77          }
78      </style>
79  </head>
80  <body>
81      <div class="container">
82          <div class="loader"></div>
83          <h1>Redirecting...</h1>
84          <p>If you are not redirected automatically, please <a class="link" href="../app/">click here</a>.</p>
85          <p><small>Note: This page preserves query parameters when redirecting.</small></p>
86      </div>
87  </body>
88  </html>