Skip to content

Commit

Permalink
Update 404.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Fiszh authored Sep 26, 2024
1 parent 5ddf7c0 commit bb7d5ab
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions 404.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,44 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dynamic Path Display</title>
</head>

<body>
<h1 id="content">Dynamic path content will appear here</h1>
<div id="emote-container"></div>

<div class="container">
<div class="embed">
<div id="twitch-embed"></div>
<script src="https://player.twitch.tv/js/embed/v1.js"></script>
<script type="text/javascript">
try {
var input = window.location.pathname.split('/');
var chnl = input[1];

<script>
const path = window.location.pathname.substring(1); // Get the dynamic part of the path
document.getElementById('content').innerText = path || 'Hello'; // Show the path or default to 'Hello'
</script>
console.log(input)

if (!chnl) {
chnl = "psp1g";
}

new Twitch.Player("twitch-embed", {
width: "100%",
height: "100%",
channel: chnl,
muted: false,
quality: "1080p60",
theme: "dark",
layout: "video",
parent: "fiszh.github.io",
});
} catch (error) {
console.error(error);
}
</script>
</div>
</div>
</body>

</html>

0 comments on commit bb7d5ab

Please sign in to comment.