This commit is contained in:
poiuty 2023-06-14 17:19:40 +03:00
parent fa0ef08e6f
commit 4d505b0a10
7 changed files with 315 additions and 1 deletions

File diff suppressed because one or more lines are too long

188
css/simplebar.css Normal file
View file

@ -0,0 +1,188 @@
[data-simplebar] {
position: relative;
flex-direction: column;
flex-wrap: wrap;
justify-content: flex-start;
align-content: flex-start;
align-items: flex-start;
}
.simplebar-wrapper {
overflow: hidden;
width: inherit;
height: inherit;
max-width: inherit;
max-height: inherit;
}
.simplebar-mask {
direction: inherit;
position: absolute;
overflow: hidden;
padding: 0;
margin: 0;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: auto !important;
height: auto !important;
z-index: 0;
}
.simplebar-offset {
direction: inherit !important;
box-sizing: inherit !important;
resize: none !important;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
padding: 0;
margin: 0;
-webkit-overflow-scrolling: touch;
}
.simplebar-content-wrapper {
direction: inherit;
box-sizing: border-box !important;
position: relative;
display: block;
height: 100%; /* Required for horizontal native scrollbar to not appear if parent is taller than natural height */
width: auto;
max-width: 100%; /* Not required for horizontal scroll to trigger */
max-height: 100%; /* Needed for vertical scroll to trigger */
scrollbar-width: none;
-ms-overflow-style: none;
}
.simplebar-content-wrapper::-webkit-scrollbar,
.simplebar-hide-scrollbar::-webkit-scrollbar {
width: 0;
height: 0;
}
.simplebar-content:before,
.simplebar-content:after {
content: " ";
display: table;
}
.simplebar-placeholder {
max-height: 100%;
max-width: 100%;
width: 100%;
pointer-events: none;
}
.simplebar-height-auto-observer-wrapper {
box-sizing: inherit !important;
height: 100%;
width: 100%;
max-width: 1px;
position: relative;
float: left;
max-height: 1px;
overflow: hidden;
z-index: -1;
padding: 0;
margin: 0;
pointer-events: none;
flex-grow: inherit;
flex-shrink: 0;
flex-basis: 0;
}
.simplebar-height-auto-observer {
box-sizing: inherit;
display: block;
opacity: 0;
position: absolute;
top: 0;
left: 0;
height: 1000%;
width: 1000%;
min-height: 1px;
min-width: 1px;
overflow: hidden;
pointer-events: none;
z-index: -1;
}
.simplebar-track {
z-index: 1;
position: absolute;
right: 0;
bottom: 0;
pointer-events: none;
overflow: hidden;
}
[data-simplebar].simplebar-dragging .simplebar-content {
pointer-events: none;
user-select: none;
-webkit-user-select: none;
}
[data-simplebar].simplebar-dragging .simplebar-track {
pointer-events: all;
}
.simplebar-scrollbar {
position: absolute;
left: 0;
right: 0;
min-height: 10px;
}
.simplebar-scrollbar:before {
position: absolute;
content: "";
background: black;
border-radius: 7px;
left: 2px;
right: 2px;
opacity: 0;
transition: opacity 0.2s linear;
}
.simplebar-scrollbar.simplebar-visible:before {
/* When hovered, remove all transitions from drag handle */
opacity: 0.5;
transition: opacity 0s linear;
}
.simplebar-track.simplebar-vertical {
top: 0;
width: 11px;
}
.simplebar-track.simplebar-vertical .simplebar-scrollbar:before {
top: 2px;
bottom: 2px;
}
.simplebar-track.simplebar-horizontal {
left: 0;
height: 11px;
}
.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before {
height: 100%;
left: 2px;
right: 2px;
}
.simplebar-track.simplebar-horizontal .simplebar-scrollbar {
right: auto;
left: 0;
top: 2px;
height: 7px;
min-height: 0;
min-width: 10px;
width: auto;
}
/* Rtl support */
[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical {
right: auto;
left: 0;
}
.hs-dummy-scrollbar-size {
direction: rtl;
position: fixed;
opacity: 0;
visibility: hidden;
height: 500px;
width: 500px;
overflow-y: hidden;
overflow-x: scroll;
}
.simplebar-hide-scrollbar {
position: fixed;
left: 0;
visibility: hidden;
overflow-y: scroll;
scrollbar-width: none;
-ms-overflow-style: none;
}

File diff suppressed because one or more lines are too long

View file

@ -13,6 +13,7 @@
<link rel="stylesheet" href="./css/font-awesome.min.css">
<link rel="stylesheet" href="./css/metricsgraphics.min.css">
<link rel="stylesheet" href="./css/bootstrap.min.css" >
<link rel="stylesheet" href="./css/simplebar.css" >
<link rel="stylesheet" href="./css/statbate.css">
</head>
@ -60,7 +61,9 @@
<div class="income_chart"></div>
<div class="content_center">
<div class="content_wslog"></div>
<div class="content_wslog" data-simplebar>
<div class="wstext"></div>
</div>
<div class="content_table">
<table class="fin_table">
<tbody>
@ -121,6 +124,7 @@
<script src="./js/d3.min.js"></script>
<script src="./js/metricsgraphics.min.js"></script>
<script src="./js/bootstrap.min.js"></script>
<script src="./js/simplebar.js"></script>
<script src="./js/statbate.js"></script>
</html>

1
js/bootstrap.min.js.map Normal file

File diff suppressed because one or more lines are too long

10
js/simplebar.js Normal file

File diff suppressed because one or more lines are too long

View file

@ -54,4 +54,91 @@ function showStat() {
area: [false, true, false],
});
}
function printWsText(text) {
if ($('.wstext').length == 0 || text.length == 0) {
return;
}
date = new Date();
xMin = (date.getUTCMinutes() < 10 ? '0' : '') + date.getUTCMinutes()
xSec = (date.getUTCSeconds() < 10 ? '0' : '') + date.getUTCSeconds()
time = date.getUTCHours() + ":" + xMin + ":" + xSec;
message = text;
console.log(mobile);
if(window.innerWidth > 805){
message = '[' + time + '] ' + message;
}
message = '<div class="message">' + message + '</div>'
if(msgs.arr.length > 64) {
msgs.arr.pop()
}
msgs.arr.unshift(message)
document.querySelector('.wstext').innerHTML = msgs.arr.join('');
}
function statbate() {
var ws = new WebSocket("wss://statbate.com/ws/");
ws.onopen = function () {
printWsText('Socket is open. Here is the log of big tips.');
console.log('websocket open');
ws.send("chaturbate");
};
window.onbeforeunload = function() {
ws.onclose = function () {}; // disable onclose handler first
ws.close(1000);
};
ws.onclose = function (e) {
printWsText('Socket is closed. Reconnect will be attempted in 1 second.');
console.log('Socket is closed. Reconnect will be attempted in 1 second.', e.code);
setTimeout(function () {
statbate();
}, 1000);
return;
};
ws.onmessage = function (e) {
if(e.data == "ping") {
ws.send("pong");
return;
}
j = JSON.parse(e.data);
if (j.count) {
$(".trackCount").text("track " + j.count + " rooms");
return;
}
if(typeof chartActivity !== "undefined" && chartActivity && j.index){
point = chartActivity.series[0].points[0];
if(j.index < 10)
point.update(parseFloat(j.index.toFixed(2)));
else
point.update(Math.round(j.index));
return;
}
if(j.donator){
text = "<a href='/l/" + j.donator + "' rel='nofollow' target='_blank'>" + j.donator + "</a> send " + j.amount + " tokens to <a href='/l/" + j.room + "' rel='nofollow' target='_blank'>" + j.room + "</a>";
if (j.amount > 499) {
text = '<font color="#ae8d0b"><b>' + text + '</b></font>';
}
printWsText(text);
return;
}
};
}
msgs = {
arr: [],
}
statbate();
showStat();
console.log('Debug https://statbate.com/debug.php');
console.log('Statbate is open source project (https://github.com/statbate)');