q78kgblog 0.0.0-1732620965308 → 0.0.0-1732800108145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/404.html +933 -1
- package/about/index.html +1085 -1
- package/archives/2023/02/index.html +933 -1
- package/archives/2023/04/index.html +933 -1
- package/archives/2023/05/index.html +933 -1
- package/archives/2023/08/index.html +933 -1
- package/archives/2023/09/index.html +933 -1
- package/archives/2023/index.html +933 -1
- package/archives/2024/01/index.html +933 -1
- package/archives/2024/02/index.html +933 -1
- package/archives/2024/11/index.html +933 -1
- package/archives/2024/index.html +933 -1
- package/archives/index.html +933 -1
- package/archives/page/2/index.html +933 -1
- package/assets/css/APlayer.min.css +3 -1
- package/assets/js/APlayer.min.js +2 -154
- package/assets/js/Meting.min.js +1 -3
- package/atom.xml +12 -12
- package/baidusitemap.xml +15 -15
- package/bangumis/index.html +1055 -1
- package/bigpie/index.html +705 -1
- package/categories/Hexo/index.html +945 -1
- package/categories/index.html +701 -1
- package/categories//345/271/264/347/273/210/346/200/273/347/273/223/index.html +945 -1
- package/categories//346/212/200/346/234/257/345/210/206/344/272/253/index.html +945 -1
- package/categories//347/264/240/346/235/220/index.html +945 -1
- package/categories//351/227/262/350/201/212/346/235/202/350/260/210/index.html +945 -1
- package/content.json +1 -1
- package/css/swiper.min.css +703 -1
- package/fcircle/index.html +724 -1
- package/fontawesome/index.html +707 -1
- package/index.html +1085 -1
- package/js/aplayersave.js +1 -1
- package/js/baiduhistory.js +1 -1
- package/js/browser.js +1 -1
- package/js/calendar.js +1 -1
- package/js/cate.js +1 -1
- package/js/commentBarrage.js +13 -13
- package/js/commentsCount.js +1 -1
- package/js/copy.js +1 -1
- package/js/countup.js +1 -1
- package/js/cursor.js +1 -1
- package/js/day.js +2 -2
- package/js/dianzan.js +1 -1
- package/js/dis.js +3 -3
- package/js/fixbugpjax.js +1 -1
- package/js/fixed_card_widget.js +1 -1
- package/js/fps.js +1 -1
- package/js/gitalker.js +1 -1
- package/js/gsap.min.js +4 -1
- package/js/heimu.js +1 -1
- package/js/hide.show.js +1 -1
- package/js/languages.js +1 -1
- package/js/latest.js +1 -1
- package/js/local-search.js +2 -2
- package/js/lunar.js +1 -1
- package/js/lyxTalk.js +1 -1
- package/js/main.js +2 -2
- package/js/nav.js +1 -1
- package/js/noie.js +1 -1
- package/js/owo.js +1 -1
- package/js/people.js +2 -2
- package/js/pikaday.js +109 -1
- package/js/random.js +1 -1
- package/js/randomFriend.js +1 -1
- package/js/resizeTop.js +1 -1
- package/js/rightmenu.js +3 -3
- package/js/sakura.js +1 -1
- package/js/search/algolia.js +4 -4
- package/js/search/local-search.js +1 -1
- package/js/settings.js +2 -2
- package/js/sitetime.js +1 -1
- package/js/smooth-scrolling.js +1 -1
- package/js/sw-toolbox.js +1 -1
- package/js/swiperinit.js +1 -1
- package/js/tw_cn.js +1 -1
- package/js/utils.js +1 -1
- package/js/welcome.js +1 -1
- package/js/welcomeconsole.js +1 -1
- package/links/index.html +932 -1
- package/live2d-widget/autoload.js +63 -19
- package/live2d-widget/demo/demo.html +34 -1
- package/live2d-widget/demo/login.html +271 -1
- package/live2d-widget/live2d.min.js +1 -45
- package/live2d-widget/rollup.config.js +35 -2
- package/live2d-widget/src/index.js +175 -4
- package/live2d-widget/src/message.js +22 -1
- package/live2d-widget/src/model.js +75 -1
- package/live2d-widget/src/tools.js +78 -1
- package/live2d-widget/src/utils.js +5 -1
- package/live2d-widget/src/waifu-tips.js +3 -1
- package/live2d-widget/waifu-tips.js +2 -7
- package/live2d-widget/waifu.css +310 -1
- package/noie.html +69 -1
- package/othersite/index.html +770 -1
- package/package.json +1 -1
- package/people.html +24 -1
- package/posts/164ef646/index.html +1018 -1
- package/posts/1ee472c8/index.html +1006 -1
- package/posts/228c2ef8/index.html +1005 -1
- package/posts/2b89093e/index.html +1003 -1
- package/posts/a9a6c1fb/index.html +1032 -1
- package/posts/ad884987/index.html +1005 -1
- package/posts/c262e439/index.html +993 -1
- package/posts/c81531cf/index.html +1071 -1
- package/posts/ce5471fd/index.html +993 -1
- package/posts/de1f83f4/index.html +1061 -1
- package/posts/e54f7476/index.html +1053 -1
- package/random.html +30 -1
- package/sitemap.txt +5 -5
- package/sitemap.xml +69 -69
- package/sw.js +2 -2
- package/swReg.js +1 -1
- package/tags/AI/index.html +946 -1
- package/tags/Abbrlink/index.html +946 -1
- package/tags/Butterfly/index.html +946 -1
- package/tags/Cloudflare/index.html +946 -1
- package/tags/DiffSinger/index.html +946 -1
- package/tags/Hexo/index.html +946 -1
- package/tags/Markdown/index.html +946 -1
- package/tags/Next/index.html +946 -1
- package/tags/Obsidian/index.html +946 -1
- package/tags/RAID/index.html +946 -1
- package/tags/Vercel/index.html +946 -1
- package/tags/Workers/index.html +946 -1
- package/tags/index.html +701 -1
- package/tags//344/270/273/351/242/230/index.html +946 -1
- package/tags//345/206/231/344/275/234/index.html +946 -1
- package/tags//345/245/263/346/200/247/346/204/217/350/257/206/index.html +946 -1
- package/tags//345/255/246/344/271/240/index.html +946 -1
- package/tags//345/256/266/351/207/214/344/272/221/index.html +946 -1
- package/tags//345/271/264/347/273/210/346/200/273/347/273/223/index.html +946 -1
- package/tags//346/212/230/350/205/276/index.html +946 -1
- package/tags//346/227/245/345/270/270/index.html +946 -1
- package/tags//346/234/215/345/212/241/345/231/250/index.html +946 -1
- package/tags//346/260/270/344/271/205/351/223/276/346/216/245/index.html +946 -1
- package/tags//346/265/252/346/275/256/index.html +946 -1
- package/tags//347/237/255/351/223/276/346/216/245/index.html +946 -1
- package/tags//347/256/200/347/210/261/index.html +946 -1
- package/tags//347/274/226/350/276/221/345/231/250/index.html +946 -1
- package/tags//350/207/252/345/212/250/346/240/207/346/263/250/index.html +946 -1
- package/tags//350/256/272/346/226/207/index.html +946 -1
- package/tags//350/260/267/346/255/214/347/277/273/350/257/221/index.html +946 -1
- package/tags//350/264/237/350/275/275/345/235/207/350/241/241/index.html +946 -1
- package/tags//351/207/221/345/217/245/index.html +946 -1
- package/tags//351/255/224/346/224/271/index.html +946 -1
@@ -1,19 +1,63 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
1
|
+
// live2d_path 参数建议使用绝对路径
|
2
|
+
const live2d_path = "/live2d-widget/";
|
3
|
+
//const live2d_path = "/live2d-widget/";
|
4
|
+
|
5
|
+
// 封装异步加载资源的方法
|
6
|
+
function loadExternalResource(url, type) {
|
7
|
+
return new Promise((resolve, reject) => {
|
8
|
+
let tag;
|
9
|
+
|
10
|
+
if (type === "css") {
|
11
|
+
tag = document.createElement("link");
|
12
|
+
tag.rel = "stylesheet";
|
13
|
+
tag.href = url;
|
14
|
+
}
|
15
|
+
else if (type === "js") {
|
16
|
+
tag = document.createElement("script");
|
17
|
+
tag.src = url;
|
18
|
+
}
|
19
|
+
if (tag) {
|
20
|
+
tag.onload = () => resolve(url);
|
21
|
+
tag.onerror = () => reject(url);
|
22
|
+
document.head.appendChild(tag);
|
23
|
+
}
|
24
|
+
});
|
25
|
+
}
|
26
|
+
|
27
|
+
// 加载 waifu.css live2d.min.js waifu-tips.js
|
28
|
+
if (screen.width >= 768) {
|
29
|
+
Promise.all([
|
30
|
+
loadExternalResource(live2d_path + "waifu.css", "css"),
|
31
|
+
loadExternalResource(live2d_path + "live2d.min.js", "js"),
|
32
|
+
loadExternalResource(live2d_path + "waifu-tips.js", "js")
|
33
|
+
]).then(() => {
|
34
|
+
// 配置选项的具体用法见 README.md
|
35
|
+
initWidget({
|
36
|
+
waifuPath: live2d_path + "waifu-tips.json",
|
37
|
+
//apiPath: "https://github.com/fghrsh/live2d_api/tree/1.0.1/",
|
38
|
+
//cdnPath: "https://npm.elemecdn.com/akilar-live2dapi@latest/",
|
39
|
+
cdnPath: "https://npm.elemecdn.com/akilar-live2dapi@latest/",
|
40
|
+
tools: ["hitokoto", "asteroids", "switch-model", "switch-texture", "photo", "info", "quit"]
|
41
|
+
});
|
42
|
+
});
|
43
|
+
}
|
44
|
+
|
45
|
+
console.log(`
|
46
|
+
く__,.ヘヽ. / ,ー、 〉
|
47
|
+
\ ', !-─‐-i / /´
|
48
|
+
/`ー' L//`ヽ、
|
49
|
+
/ /, /| , , ',
|
50
|
+
イ / /-‐/ i L_ ハ ヽ! i
|
51
|
+
レ ヘ 7イ`ト レ'ァ-ト、!ハ| |
|
52
|
+
!,/7 '0' ´0iソ| |
|
53
|
+
|.从" _ ,,,, / |./ |
|
54
|
+
レ'| i>.、,,__ _,.イ / .i |
|
55
|
+
レ'| | / k_7_/レ'ヽ, ハ. |
|
56
|
+
| |/i 〈|/ i ,.ヘ | i |
|
57
|
+
.|/ / i: ヘ! \ |
|
58
|
+
kヽ>、ハ _,.ヘ、 /、!
|
59
|
+
!'〈//`T´', \ `'7'ーr'
|
60
|
+
レ'ヽL__|___i,___,ンレ|ノ
|
61
|
+
ト-,/ |___./
|
62
|
+
'ー' !_,.:
|
63
|
+
`);
|
@@ -1 +1,34 @@
|
|
1
|
-
<!
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<title>Live2D 看板娘 / Demo</title>
|
6
|
+
<style>
|
7
|
+
#github svg {
|
8
|
+
transition: all 1s;
|
9
|
+
fill: #222;
|
10
|
+
color: #fff;
|
11
|
+
position: absolute;
|
12
|
+
top: 0;
|
13
|
+
right: 0;
|
14
|
+
border: 0;
|
15
|
+
width: 80px;
|
16
|
+
height: 80px;
|
17
|
+
}
|
18
|
+
#github:hover svg {
|
19
|
+
width: 160px;
|
20
|
+
height: 160px;
|
21
|
+
}
|
22
|
+
</style>
|
23
|
+
</head>
|
24
|
+
<body>
|
25
|
+
<a id="github" href="https://github.com/stevenjoezhang/live2d-widget" target="_blank" title="Visit the open-source code on GitHub!">
|
26
|
+
<svg viewBox="0 0 250 250" aria-hidden="true">
|
27
|
+
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
|
28
|
+
<path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" class="octo-arm"></path>
|
29
|
+
<path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>
|
30
|
+
</svg>
|
31
|
+
</a>
|
32
|
+
<script src="../autoload.js"></script>
|
33
|
+
</body>
|
34
|
+
</html>
|
@@ -1 +1,271 @@
|
|
1
|
-
<!
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
6
|
+
<title>看板娘登陆平台</title>
|
7
|
+
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css">
|
8
|
+
<link rel="stylesheet" href="https://fastly.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css">
|
9
|
+
<script src="../live2d.min.js"></script>
|
10
|
+
<style>
|
11
|
+
html, body {
|
12
|
+
height: 100%;
|
13
|
+
}
|
14
|
+
body {
|
15
|
+
display: flex;
|
16
|
+
align-items: center;
|
17
|
+
justify-content: center;
|
18
|
+
padding-top: 40px;
|
19
|
+
padding-bottom: 40px;
|
20
|
+
background-color: #f5f5f5;
|
21
|
+
}
|
22
|
+
.form-signin {
|
23
|
+
width: 100%;
|
24
|
+
max-width: 330px;
|
25
|
+
padding: 15px;
|
26
|
+
margin: 0 auto;
|
27
|
+
}
|
28
|
+
.form-signin .checkbox {
|
29
|
+
font-weight: 400;
|
30
|
+
}
|
31
|
+
.form-signin .form-control {
|
32
|
+
position: relative;
|
33
|
+
box-sizing: border-box;
|
34
|
+
height: auto;
|
35
|
+
padding: 10px;
|
36
|
+
font-size: 16px;
|
37
|
+
}
|
38
|
+
.form-signin .form-control:focus {
|
39
|
+
z-index: 2;
|
40
|
+
}
|
41
|
+
.form-signin input[type=text] {
|
42
|
+
margin-bottom: -1px;
|
43
|
+
border-bottom-right-radius: 0;
|
44
|
+
border-bottom-left-radius: 0;
|
45
|
+
}
|
46
|
+
.form-signin input[type=password] {
|
47
|
+
margin-bottom: 10px;
|
48
|
+
border-top-left-radius: 0;
|
49
|
+
border-top-right-radius: 0;
|
50
|
+
}
|
51
|
+
#stage {
|
52
|
+
position: relative;
|
53
|
+
}
|
54
|
+
#stage img {
|
55
|
+
width: 100%;
|
56
|
+
margin-bottom: 20px;
|
57
|
+
border-radius: 20px;
|
58
|
+
}
|
59
|
+
#stage button {
|
60
|
+
position: absolute;
|
61
|
+
padding: 0;
|
62
|
+
}
|
63
|
+
#inner {
|
64
|
+
position: relative;
|
65
|
+
background-color: #999;
|
66
|
+
clip-path: circle(120px at center);
|
67
|
+
}
|
68
|
+
#cover {
|
69
|
+
position: absolute;
|
70
|
+
background-color: #CB3837;
|
71
|
+
width: 100%;
|
72
|
+
height: 100%;
|
73
|
+
bottom: 10%;
|
74
|
+
transition: all 1s;
|
75
|
+
box-shadow: 0 0 0 5px rgba(0, 0, 0, .1);
|
76
|
+
}
|
77
|
+
#text {
|
78
|
+
position: absolute;
|
79
|
+
bottom: 30%;
|
80
|
+
font-size: 2em;
|
81
|
+
left: 50%;
|
82
|
+
transform: translateX(-50%);
|
83
|
+
opacity: 0.4;
|
84
|
+
font-weight: bold;
|
85
|
+
}
|
86
|
+
#detail {
|
87
|
+
position: absolute;
|
88
|
+
background: rgba(255, 255, 255, .1);
|
89
|
+
width: 100%;
|
90
|
+
height: 10px;
|
91
|
+
bottom: 0;
|
92
|
+
}
|
93
|
+
#handle {
|
94
|
+
position: absolute;
|
95
|
+
background: #ccc;
|
96
|
+
bottom: -2px;
|
97
|
+
box-shadow: 0 1px 0 1px rgba(0, 0, 0, .1);
|
98
|
+
height: 8px;
|
99
|
+
left: 50%;
|
100
|
+
margin-left: -15px;
|
101
|
+
width: 30px;
|
102
|
+
cursor: pointer;
|
103
|
+
}
|
104
|
+
#info {
|
105
|
+
left: 40px;
|
106
|
+
bottom: 20px;
|
107
|
+
}
|
108
|
+
#refresh {
|
109
|
+
right: 40px;
|
110
|
+
bottom: 20px;
|
111
|
+
}
|
112
|
+
#live2d {
|
113
|
+
cursor: grab;
|
114
|
+
height: 300px;
|
115
|
+
width: 300px;
|
116
|
+
}
|
117
|
+
#live2d:active {
|
118
|
+
cursor: grabbing;
|
119
|
+
}
|
120
|
+
</style>
|
121
|
+
</head>
|
122
|
+
<body class="text-center">
|
123
|
+
<form class="form-signin" action="login.php" method="post">
|
124
|
+
<div id="stage">
|
125
|
+
<div id="inner">
|
126
|
+
<div id="cover">
|
127
|
+
<div id="text">
|
128
|
+
<span style="color: cyan;">MIMI</span><span style="color: white;">POWERED</span>
|
129
|
+
</div>
|
130
|
+
<div id="detail"></div>
|
131
|
+
<div id="handle"></div>
|
132
|
+
</div>
|
133
|
+
<canvas class="mb-4" id="live2d" width="800" height="800"></canvas>
|
134
|
+
</div>
|
135
|
+
<button class="btn btn-link" id="info"><i class="fa fa-lg fa-info"></i></button>
|
136
|
+
<button class="btn btn-link" id="refresh"><i class="fa fa-lg fa-sync-alt"></i></button>
|
137
|
+
</div>
|
138
|
+
<h1 class="h3 mb-3 fw-normal">看板娘登陆平台</h1>
|
139
|
+
<label for="room" class="sr-only">用户名</label>
|
140
|
+
<input type="text" name="room" class="form-control" placeholder="用户名" required autofocus>
|
141
|
+
<label for="pass" class="sr-only">密码</label>
|
142
|
+
<input type="password" name="pass" class="form-control" placeholder="密码" required>
|
143
|
+
<div class="checkbox mb-4">
|
144
|
+
<label>
|
145
|
+
<input type="checkbox" value="remember-me"> 记住我
|
146
|
+
</label>
|
147
|
+
</div>
|
148
|
+
<div class="d-grid">
|
149
|
+
<button class="btn btn-lg btn-primary" type="submit">登录</button>
|
150
|
+
</div>
|
151
|
+
<p class="mt-5 mb-3 text-muted">Copyleft © Mimi 2019</p>
|
152
|
+
</form>
|
153
|
+
<script>
|
154
|
+
/*
|
155
|
+
* _(:з」∠)_
|
156
|
+
* Created by Shuqiao Zhang in 2019.
|
157
|
+
* https://zhangshuqiao.org
|
158
|
+
*/
|
159
|
+
|
160
|
+
/*
|
161
|
+
* This program is free software: you can redistribute it and/or modify
|
162
|
+
* it under the terms of the GNU General Public License as published by
|
163
|
+
* the Free Software Foundation, either version 3 of the License, or
|
164
|
+
* (at your option) any later version.
|
165
|
+
*
|
166
|
+
* This program is distributed in the hope that it will be useful,
|
167
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
168
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
169
|
+
* GNU General Public License for more details.
|
170
|
+
*/
|
171
|
+
window.addEventListener("load", () => {
|
172
|
+
"use strict";
|
173
|
+
|
174
|
+
if (!CSS.supports("clip-path", "circle(120px at center)")) {
|
175
|
+
document.getElementById("stage").innerHTML = '<img src="../assets/screenshot-1.png">';
|
176
|
+
return;
|
177
|
+
}
|
178
|
+
|
179
|
+
const apiPath = "https://live2d.fghrsh.net/api";
|
180
|
+
let state = 0, loading = false,
|
181
|
+
modelId = localStorage.getItem("modelId"),
|
182
|
+
modelTexturesId = localStorage.getItem("modelTexturesId");
|
183
|
+
if (modelId === null) {
|
184
|
+
modelId = 1;
|
185
|
+
modelTexturesId = 53;
|
186
|
+
}
|
187
|
+
loadModel(modelId, modelTexturesId);
|
188
|
+
|
189
|
+
function loadModel(modelId, modelTexturesId) {
|
190
|
+
localStorage.setItem("modelId", modelId);
|
191
|
+
if (modelTexturesId === undefined) modelTexturesId = 0;
|
192
|
+
localStorage.setItem("modelTexturesId", modelTexturesId);
|
193
|
+
loadlive2d("live2d", `${apiPath}/get/?id=${modelId}-${modelTexturesId}`, null);
|
194
|
+
console.log("live2d", `模型 ${modelId}-${modelTexturesId} 加载完成`);
|
195
|
+
setTimeout(() => {
|
196
|
+
coverPosition("80%");
|
197
|
+
state = 2;
|
198
|
+
}, 2000);
|
199
|
+
}
|
200
|
+
|
201
|
+
function loadRandModel() {
|
202
|
+
const modelId = localStorage.getItem("modelId"),
|
203
|
+
modelTexturesId = localStorage.getItem("modelTexturesId");
|
204
|
+
fetch(`${apiPath}/rand_textures/?id=${modelId}-${modelTexturesId}`)
|
205
|
+
.then(response => response.json())
|
206
|
+
.then(result => {
|
207
|
+
loadModel(modelId, result.textures.id);
|
208
|
+
setTimeout(() => {
|
209
|
+
state = 2;
|
210
|
+
coverPosition("80%");
|
211
|
+
loading = false;
|
212
|
+
}, 1000);
|
213
|
+
});
|
214
|
+
}
|
215
|
+
|
216
|
+
function loadOtherModel() {
|
217
|
+
const modelId = localStorage.getItem("modelId");
|
218
|
+
fetch(`${apiPath}/switch/?id=${modelId}`)
|
219
|
+
.then(response => response.json())
|
220
|
+
.then(result => {
|
221
|
+
loadModel(result.model.id);
|
222
|
+
});
|
223
|
+
}
|
224
|
+
|
225
|
+
function coverPosition(pos) {
|
226
|
+
document.getElementById("cover").style.bottom = pos;
|
227
|
+
}
|
228
|
+
|
229
|
+
document.getElementById("info").addEventListener("click", () => {
|
230
|
+
fetch("https://v1.hitokoto.cn")
|
231
|
+
.then(response => response.json())
|
232
|
+
.then(result => {
|
233
|
+
alert("「" + result.hitokoto + "」——" + result.from);
|
234
|
+
});
|
235
|
+
});
|
236
|
+
|
237
|
+
document.getElementById("refresh").addEventListener("click", () => {
|
238
|
+
if (loading) return;
|
239
|
+
state = 0;
|
240
|
+
coverPosition("10%");
|
241
|
+
loading = true;
|
242
|
+
setTimeout(loadRandModel, 1000);
|
243
|
+
});
|
244
|
+
|
245
|
+
document.getElementById("handle").addEventListener("click", () => {
|
246
|
+
if (state === 1) {
|
247
|
+
state = 2;
|
248
|
+
coverPosition("80%");
|
249
|
+
}
|
250
|
+
else if (state === 2) {
|
251
|
+
state = 1;
|
252
|
+
coverPosition("20%");
|
253
|
+
}
|
254
|
+
});
|
255
|
+
|
256
|
+
document.querySelector("input[type=password]").addEventListener("focus", () => {
|
257
|
+
if (state === 2) {
|
258
|
+
state = 1;
|
259
|
+
coverPosition("20%");
|
260
|
+
}
|
261
|
+
});
|
262
|
+
document.querySelector("input[type=password]").addEventListener("blur", () => {
|
263
|
+
if (state === 1) {
|
264
|
+
state = 2;
|
265
|
+
coverPosition("80%");
|
266
|
+
}
|
267
|
+
});
|
268
|
+
});
|
269
|
+
</script>
|
270
|
+
</body>
|
271
|
+
</html>
|