-
Notifications
You must be signed in to change notification settings - Fork 1
/
brackets.htm
63 lines (59 loc) · 1.58 KB
/
brackets.htm
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
<!DOCTYPE html>
<html>
<head>
<title>Toornament</title>
<meta charset="utf-8" />
</head>
<body>
<iframe src="" class="iframe1" frameborder="0" allowfullscreen="true" scrolling="no"></iframe>
<iframe src="" class="iframe2" frameborder="0" allowfullscreen="true" scrolling="no"></iframe>
<style>
html, body {
margin: 0px;
width: 100%;
height: 100%;
user-select: none;
pointer-events: none;
}
iframe {
position: absolute;
top: 0px;
right: 0px;
width: 27%;
height: 240%;
overflow: hidden;
background: transparent;
}
iframe.active {
left: 0px;
}
</style>
<script>
let myFrame1 = document.querySelector(".iframe1");
let myFrame2 = document.querySelector(".iframe2");
function reloadIFrame1() {
myFrame1.src = "https://widget.toornament.com/tournaments/4380178619867095040/stages/4380192956457992192/?_locale=en_US";
myFrame1.onload = function() {
myFrame1.classList.add("active");
myFrame2.classList.remove("active");
};
}
function reloadIFrame2() {
myFrame2.src = "https://widget.toornament.com/tournaments/4380178619867095040/stages/4380192956457992192/?_locale=en_US";
myFrame2.onload = function() {
myFrame1.classList.remove("active");
myFrame2.classList.add("active");
};
}
reloadIFrame1();
setInterval(function () {
reloadIFrame1();
}, 5000);
setTimeout(function() {
setInterval(function () {
reloadIFrame2();
}, 5000);
}, 2500);
</script>
</body>
</html>