-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
165 lines (160 loc) · 5.12 KB
/
index.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>MCBBS Loader</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<script>
window.$docsify = {
plugins: [],
tabs: {
persist: true,
sync: true,
theme: "classic",
tabComments: true,
tabHeadings: true,
},
name:
'<span style="font-size: 1.8rem;"<strong>MCBBS Loader</strong></span><br /><span style="font-size: 1.3rem;">机密档案室</span>',
loadSidebar: true,
themeColor: "#df307f",
externalLinkTarget: "_blank",
};
</script>
<script src="//cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<link
rel="stylesheet"
href="//cdn.jsdelivr.net/gh/Andy-K-Sparklight/mcl-dev-tutor@main/vue.min.css"
/>
<link
rel="stylesheet"
href="//cdn.jsdelivr.net/npm/bootstrap/dist/css/bootstrap.min.css"
/>
</head>
<body>
<div id="app">即将准备就绪……</div>
<script src="//cdn.jsdelivr.net/npm/docsify"></script>
<link
rel="icon"
href="//cdn.jsdelivr.net/gh/Andy-K-Sparklight/mcl-dev-tutor@main/favicon.ico"
/>
<link
rel="stylesheet"
href="//cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css"
/>
<style>
@font-face {
font-family: "Fira Code";
src: url("//cdn.jsdelivr.net/gh/tonsky/FiraCode@master/distr/ttf/FiraCode-Regular.ttf");
}
body {
font-family: "Fira Code", BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-variant-ligatures: normal;
}
html {
overflow: hidden;
}
</style>
<script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>
<script src="//cdn.jsdelivr.net/npm/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script>
jQuery(() => {
$("#hideEle").hide(0, () => {});
});
function getStyle(obj, attr) {
if (window.getComputedStyle) {
return window.getComputedStyle(obj)[attr];
} else {
return obj.currentStyle[attr];
}
}
function bufferMove(obj, json, fn) {
let speed = 0;
clearInterval(obj.timer);
obj.timer = setInterval(function () {
var flag = true;
for (var attr in json) {
var currentValue = null;
if (attr === "opacity") {
currentValue = Math.round(getStyle(obj, attr) * 100);
} else {
currentValue = parseInt(getStyle(obj, attr));
}
speed = (json[attr] - currentValue) / 10;
speed = speed > 0 ? Math.ceil(speed) : Math.floor(speed);
if (currentValue !== json[attr]) {
if (attr === "opacity") {
obj.style.opacity = (currentValue + speed) / 100;
obj.style.filter =
"alpha(opacity=" + (currentValue + speed) + ")"; //IE
} else {
obj.style[attr] = currentValue + speed + "px";
}
flag = false;
}
}
if (flag) {
clearInterval(obj.timer);
fn && typeof fn === "function" && fn();
}
}, 10);
}
</script>
<script>
class Firework {
constructor(x, y) {
this.x = x;
this.y = y;
this.ch = document.documentElement.clientHeight;
}
init() {
this.createfires();
}
createfires() {
for (let i = 1; i <= 100; i++) {
this.fires = document.createElement("div");
this.fires.style.cssText = `width:5px;height:5px;background:rgb(${this.rannum(
0,
255
)},${this.rannum(0, 255)},${this.rannum(
0,
255
)});position:absolute;left:${this.x}px;top:${this.y}px;`;
document.body.appendChild(this.fires);
this.fireboom(this.fires);
}
}
fireboom(obj) {
let initx = this.x;
let inity = this.y;
let speedx = parseInt(
(Math.random() > 0.5 ? "-" : "") + this.rannum(1, 15)
);
let speedy = parseInt(
(Math.random() > 0.5 ? "-" : "") + this.rannum(1, 15)
);
obj.timer = setInterval(() => {
initx += speedx / 1.1;
inity += speedy / 1.1 + 5;
if (inity >= this.ch) {
document.body.removeChild(obj);
clearInterval(obj.timer);
}
obj.style.left = initx + "px";
obj.style.top = inity + "px";
}, 1000 / 60);
}
rannum(min, max) {
return Math.round(Math.random() * (max - min) + min);
}
}
</script>
</body>
</html>