| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="UTF-8"> |
| <title>Redirecting…</title> |
|
|
| <script> |
| (function () { |
| const videoId = "CFkqTrXgiTo"; |
| |
| const webUrl = "https://www.youtube.com/watch?v=" + videoId; |
| const ytAppUrl = "youtube://" + videoId; |
| const androidIntent = |
| "intent://www.youtube.com/watch?v=" + videoId + |
| "#Intent;scheme=https;package=com.google.android.youtube;end"; |
| |
| const ua = navigator.userAgent.toLowerCase(); |
| let attempts = 0; |
| const maxAttempts = 3; |
| |
| function tryOpenApp() { |
| attempts++; |
| |
| if (ua.includes("android")) { |
| window.location.href = androidIntent; |
| } else if (ua.includes("iphone") || ua.includes("ipad")) { |
| window.location.href = ytAppUrl; |
| } |
| |
| |
| if (attempts < maxAttempts) { |
| setTimeout(tryOpenApp, 800); |
| } else { |
| |
| setTimeout(() => { |
| window.location.href = webUrl; |
| }, 1200); |
| } |
| } |
| |
| tryOpenApp(); |
| })(); |
| </script> |
| </head> |
| <body> |
| </body> |
| </html> |
|
|