-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom.min.js
127 lines (127 loc) · 5.98 KB
/
custom.min.js
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/*!
* Copyright (C) 2021-2021 by DeVeLab [develab.uk]
*
* This software is furnished under a license and may be used and copied *
* only in accordance with the terms of such license and with the *
* inclusion of the above copyright notice. This software or any other *
* copies thereof may not be provided or otherwise made available to any *
* other person. No title to and ownership of the software is hereby *
* transferred. *
* *
* You may not reverse engineer, decompile, defeat license encryption *
* mechanisms, or disassemble this software product or software product *
* license. DeVeLAB UK may terminate this license if you don't *
* comply with any of the terms and conditions set forth in our end user *
* license agreement (EULA). In such event, licensee agrees to return *
* licensor or destroy all copies of software upon termination of the *
* license. *
* *
* Please see the EULA file for the full End User License Agreement. *
* -----------------------------------------------------------------------
*/
function increment(a) {
setTimeout(function () {
a.time++;
var e = Math.floor(a.time / 10 / 3600),
t = (e <= 9 && (e = "0" + e), Math.floor(a.time / 10 / 60) % 60),
n = (t <= 9 && (t = "0" + t), Math.floor(a.time / 10) % 60); // Remainder operator // Remainder operator
n <= 9 && (n = "0" + n), (document.getElementsByClassName("timer")[a.index].innerHTML = e + ":" + t + ":" + n), increment({ index: a.index, time: a.time });
}, 100);
}
function changeTab(e, t, n, a) {
for (var i, o = document.getElementsByClassName(n), c = 0; c < o.length; c++) o[c].style.display = "none";
for (i = document.getElementsByClassName(a), c = 0; c < i.length; c++) i[c].classList.remove("active");
(document.getElementById(t).style.display = "block"), e.currentTarget.classList.toggle("active");
}
function showDateTime() {
var e = document.getElementById("timezone"),
t = new Date(),
n =
`${["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][t.getDay()]}, ${
["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][t.getMonth()]
} ${t.getDate()}, ` + t.getFullYear(),
a = t.getHours(),
i = t.getMinutes(),
t = t.getSeconds();
if( typeof(e) != 'undefined' && e != null )
{
e.innerHTML = `<span class='pv-date'>${n}</span>,<span class='pv-timer'>${(a<10?"0":"") + a + ":" + (i<10?"0":"") + i + ":" + (t<10?"0":"") + t}</span>`;
}
}
document.querySelectorAll(".timer").forEach(function (e, t) {
let n = e.textContent,
a = n.split(":"),
i = a[0],
o = a[1],
c = a[2];
increment({ index: t, time: 10 * (3600 * i + 60 * o + +c) });
}),
setInterval(showDateTime, 1e3),
$(document).ready(function () {
let t = !0;
var n = document.getElementById("sidebar-menu");
$("#openSidebar").on("click", function (e) {
n.classList.toggle("active");
}),
$("#sidebarClose").on("click", function (e) {
n.classList.remove("active");
});
let a = document.getElementById("page-top"),
i =
($("#privacy-open").on("click", function (e) {
a.classList.toggle("privacy-open");
}),
$("#privacy-close").on("click", function (e) {
a.classList.remove("privacy-open");
}),
$(document).on("click", "#player-target", function (e) {
window.open($(this).data("redirect"), "_blank");
}),
$(document).on("click", "#target", function (e) {
window.open($(this).data("direct"), "_self");
}),
$("#search-content").on("click", function (e) {
if($("#sidebar-menu").hasClass("active"))
{
$("#sidebar-menu").removeClass("active");
}
}),
/*$(document).on("click", ".pagination a", function (e) {
e.preventDefault(), ApiRequest({ url: $(this).attr("href") });
}),*/
$(document).on("keypress", "#search-content input", function (e) {
if (13 === (e.keyCode || e.which) && !0 === t) {
if ("" === this.value) return;
/*if("" !== this.value)
{
this.value=""; //empty()
}*/
/*(t = !1),
ApiRequest({ url: "", data: { name: this.value } })
.then(function (e) {
t = !0;
})
.catch(function (e) {});*/
}
e.stopPropagation();
}),
document.addEventListener("click", function (e) {
e = e.target;
let t = $("#user-loggedIn");
t.hasClass("active") && "user-details" !== e.id && t.removeClass("active");
}),
document.getElementById("user-loggedIn"));
$("#user-details").on("click", function (e) {
i.classList.toggle("active");
}),
tippy(".playerBadge", {
arrow: !0,
animation: "scale",
theme: "pugsys",
placement: "bottom",
//trigger: 'click',
maxWidth: 250,
interactive: !0,
inertia: !0,
});
});