-
Notifications
You must be signed in to change notification settings - Fork 1
/
allperks.html
111 lines (107 loc) · 2.99 KB
/
allperks.html
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>All Perks Overlay</title>
<style>
body {
font-family: Verdana, serif;
color: #fff;
font-size: 22px;
}
.bg {
margin: 8px;
width: 320px;
height: 100px;
background-color: rgba(20, 20, 20, 0.6);
border-radius: 20px;
position: relative;
}
.bg > span {
position: absolute;
right: 15px;
text-align: right;
top: 6px;
z-index: 99;
}
.killer {
position: absolute;
left: 0px;
height: 100px;
}
.title {
font-weight: bold;
}
.percentage {
font-size: 17px;
}
.progress {
background-color: #fff;
height: 7px;
border-radius: 10px;
margin-top: 4px;
overflow: hidden;
}
.progress > span {
background-color: #4C9CC0;
display: block;
height: 7px;
transition: width 1s;
}
span.title::after {
content: '!AllPerkStreak';
}
span.count::after {
content: 'Killers';
}
img.killer {
background: url(/img/allperkstreak.png);
background-position: center;
background-size: contain;
background-repeat: no-repeat;
height: 100px;
width: 127px;
}
</style>
</head>
<body>
<div class="bg">
<span class="text">
<span class="title"></span><br>
<span class="count"><span id="count">0</span>/<span id="quantity">0</span> </span><br>
<div class="percentage">(<span id="percentage">0.00</span>%)</div>
<div class="progress"><span id="progressPercentage" style="width: 0%;"></span></div>
</span>
<img class="killer" src="/img/transparent.png" alt="">
</div>
<!-- <div class="bg" style="position: absolute;left: 8px;top: 0px;text-align: center;line-height: 139px;">
Paused
</div> -->
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.1.2/socket.io.min.js" integrity="sha512-2ho+gY0H62N4Z9oxD422L2ZYXiOMq9l+Aub1QNz4Z4UDOtDVxz4vk6O6R3Hqqc9Y7qSvZFl7cy3+eZ/ITnUrLA==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.26.0/axios.min.js" integrity="sha512-bPh3uwgU5qEMipS/VOmRqynnMXGGSRv+72H/N260MQeXZIK4PG48401Bsby9Nq5P5fz7hy5UGNmC/W1Z51h2GQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script> // https://jsfiddle.net/bc_rikko/qwbfkv6y/2/
(async () => {
const count = document.getElementById("count");
const percentage = document.getElementById("percentage");
const quantity = document.getElementById("quantity");
const progressPercentage = document.getElementById("progressPercentage");
const result = await axios.get("/allPerkData");
count.innerText = result.data.count;
percentage.innerText = result.data.percentage;
quantity.innerText = result.data.quantity;
progressPercentage.style.width = result.data.percentage + '%';
const socket = io();
socket.on('allPerkData', function (data) {
if (data === "refresh") {
location.reload();
} else if(data){
count.innerText = data.count;
percentage.innerText = data.percentage;
quantity.innerText = data.quantity;
progressPercentage.style.width = data.percentage + '%';
}
});
})()
</script>
</html>