-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrrs.html
More file actions
95 lines (81 loc) · 2.23 KB
/
trrs.html
File metadata and controls
95 lines (81 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<style>
/* CSS to remove borders and scrollbars */
html, body {
margin: 0;
padding: 0;
overflow: hidden;
}
/* CSS for fullscreen iframes */
.fullscreen-iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
/* CSS for tab navigation */
.tab-navigation {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #333;
padding: 10px;
text-align: center;
}
.tab-navigation button {
padding: 5px 10px;
margin: 0 5px;
background-color: #333;
color: #fff;
border: none;
cursor: pointer;
}
.tab-navigation button:hover {
background-color: #555;
}
.tab-navigation button.active {
background-color: #000;
}
</style>
</head>
<body>
<!-- Iframe 1 -->
<iframe class="fullscreen-iframe" src="https://www.twitch.tv/embed/tbtoothbrush/chat?darkpopout&parent=awan-gh.github.io" loading="eager"></iframe>
<!-- Iframe 2 -->
<iframe class="fullscreen-iframe" src="https://chat.restream.io/embed?token=dc1bd026-b4a2-49c2-a9e0-69e51a93ce15" loading="eager"></iframe>
<!-- Tab navigation -->
<div class="tab-navigation">
<button onclick="changeIframe(0)" class="active">Twitch Chat</button>
<button onclick="changeIframe(1)">Restream Chat</button>
</div>
<!-- JavaScript to handle tab navigation -->
<script>
// Array of iframes
const iframes = Array.from(document.querySelectorAll('.fullscreen-iframe'));
// Function to change the currently shown iframe
function changeIframe(index) {
iframes.forEach((iframe, i) => {
if (i === index) {
iframe.style.display = 'block';
} else {
iframe.style.display = 'none';
}
});
// Remove active class from all buttons
const buttons = document.querySelectorAll('.tab-navigation button');
buttons.forEach((button) => {
button.classList.remove('active');
});
// Add active class to the clicked button
buttons[index].classList.add('active');
}
// Show the first iframe by default
changeIframe(0);
</script>
</body>
</html>