hexo-theme-solitude 1.9.2 → 1.10.0
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/.github/ISSUE_TEMPLATE/config.yml +5 -1
- package/CODE_OF_CONDUCT.md +53 -93
- package/_config.yml +19 -0
- package/languages/default.yml +12 -7
- package/languages/en.yml +12 -7
- package/languages/zh-CN.yml +8 -3
- package/languages/zh-TW.yml +7 -4
- package/layout/includes/footer.pug +12 -11
- package/layout/includes/head/opengraph.pug +1 -0
- package/layout/includes/inject/head.pug +3 -3
- package/layout/includes/page/message.pug +5 -0
- package/layout/includes/page/music.pug +2 -2
- package/layout/includes/widgets/aside/asideArchive.pug +1 -1
- package/layout/includes/widgets/page/message/content.pug +9 -0
- package/layout/includes/widgets/page/message/js.pug +8 -0
- package/layout/includes/widgets/page/message/twikoo.pug +44 -0
- package/layout/includes/widgets/page/message/valine.pug +48 -0
- package/layout/includes/widgets/page/message/waline.pug +0 -0
- package/layout/includes/widgets/randomlink.pug +10 -4
- package/layout/includes/widgets/third-party/news-comment/artalk.pug +3 -3
- package/layout/includes/widgets/third-party/news-comment/twikoo.pug +3 -3
- package/layout/includes/widgets/third-party/news-comment/valine.pug +3 -3
- package/layout/includes/widgets/third-party/news-comment/waline.pug +3 -3
- package/layout/page.pug +2 -0
- package/package.json +2 -2
- package/plugins.yml +6 -6
- package/scripts/event/cdn.js +6 -1
- package/source/css/_global/index.styl +8 -13
- package/source/css/_highlight/highlight/diff.styl +6 -2
- package/source/css/_highlight/highlight/index.styl +1 -0
- package/source/css/_layout/article-container.styl +9 -3
- package/source/css/_layout/aside.styl +1 -0
- package/source/css/_layout/console.styl +3 -1
- package/source/css/_layout/footer.styl +27 -28
- package/source/css/_page/_home/category-bar.styl +16 -1
- package/source/css/_page/index.styl +1 -1
- package/source/css/_page/message.styl +63 -0
- package/source/css/_page/music.styl +55 -72
- package/source/css/_page/tag.styl +1 -0
- package/source/css/_tags/mermaid.styl +4 -1
- package/source/css/_tags/note.styl +5 -0
- package/source/css/third_party/snackbar.min.css +1 -1
- package/source/js/main.js +1 -1
- package/source/js/music.js +1 -0
- package/source/js/third_party/barrage.min.js +6 -0
- package/source/js/third_party/efu_ai.min.js +4 -4
- package/source/js/third_party/envelope.min.js +5 -0
- package/source/js/third_party/universe.min.js +1 -1
- package/source/css/_page/douban.styl +0 -127
- package/source/js/barrage_comment.js +0 -77
@@ -1,8 +1,10 @@
|
|
1
1
|
body[data-type=music]
|
2
2
|
#page-header #nav a
|
3
3
|
color var(--efu-white)
|
4
|
+
|
4
5
|
#page-header.not-top-img #nav .back-home-button
|
5
6
|
color var(--efu-white)
|
7
|
+
|
6
8
|
.page
|
7
9
|
.layout#content-inner
|
8
10
|
background none
|
@@ -51,12 +53,9 @@ body[data-type=music]
|
|
51
53
|
justify-content space-between
|
52
54
|
overflow visible
|
53
55
|
|
54
|
-
.aplayer-body
|
56
|
+
.aplayer-body
|
55
57
|
width 70%
|
56
|
-
height
|
57
|
-
|
58
|
-
+maxWidth1200()
|
59
|
-
height 80vh
|
58
|
+
height 75vh
|
60
59
|
|
61
60
|
+maxWidth798()
|
62
61
|
width 100%
|
@@ -67,20 +66,12 @@ body[data-type=music]
|
|
67
66
|
left 0
|
68
67
|
right 0
|
69
68
|
top 0
|
70
|
-
height
|
69
|
+
height calc(var(--vh) - 230px)
|
71
70
|
|
72
71
|
ol
|
73
|
-
max-height
|
72
|
+
max-height calc(var(--vh) - 170px)!important
|
74
73
|
|
75
|
-
|
76
|
-
max-height 80vh !important
|
77
|
-
|
78
|
-
+maxWidth798()
|
79
|
-
max-height 100%!important
|
80
|
-
padding-right 3px
|
81
|
-
padding-left 8px
|
82
|
-
|
83
|
-
& > li
|
74
|
+
& > li
|
84
75
|
font-size 14px
|
85
76
|
opacity 0.6
|
86
77
|
border-top none
|
@@ -88,11 +79,11 @@ body[data-type=music]
|
|
88
79
|
+maxWidth798()
|
89
80
|
display flex
|
90
81
|
|
91
|
-
&:hover
|
82
|
+
&:hover
|
92
83
|
background var(--efu-black-op)
|
93
84
|
border-radius 6px
|
94
85
|
|
95
|
-
&.aplayer-list-light
|
86
|
+
&.aplayer-list-light
|
96
87
|
background var(--efu-black-op)
|
97
88
|
border-radius 6px
|
98
89
|
height 60px
|
@@ -108,10 +99,10 @@ body[data-type=music]
|
|
108
99
|
height 52px
|
109
100
|
justify-content center
|
110
101
|
|
111
|
-
.aplayer-list-index
|
102
|
+
.aplayer-list-index
|
112
103
|
display none
|
113
104
|
|
114
|
-
.aplayer-list-title
|
105
|
+
.aplayer-list-title
|
115
106
|
font-size 20px
|
116
107
|
line-height 20px
|
117
108
|
margin-top 8px
|
@@ -123,39 +114,38 @@ body[data-type=music]
|
|
123
114
|
+maxWidth798()
|
124
115
|
margin-top 4px
|
125
116
|
|
126
|
-
.aplayer-list-cur
|
117
|
+
.aplayer-list-cur
|
127
118
|
display none
|
128
119
|
|
129
120
|
span
|
130
121
|
+maxWidth798()
|
131
122
|
color #fff
|
132
123
|
|
133
|
-
&.aplayer-list-author
|
124
|
+
&.aplayer-list-author
|
134
125
|
max-width 100%
|
135
126
|
|
136
127
|
+maxWidth798()
|
137
128
|
margin-left 0
|
138
129
|
right 15px
|
139
130
|
|
140
|
-
span
|
131
|
+
span
|
141
132
|
color var(--efu-white)
|
142
133
|
|
143
134
|
+maxWidth798()
|
144
135
|
color var(--efu-black)
|
145
136
|
|
146
|
-
&.aplayer-list-title
|
137
|
+
&.aplayer-list-title
|
147
138
|
line-height 32px
|
148
139
|
|
149
140
|
+maxWidth798()
|
150
141
|
max-width 55%
|
151
|
-
width auto
|
152
142
|
display -webkit-box
|
153
143
|
-webkit-line-clamp 1
|
154
144
|
overflow hidden
|
155
145
|
-webkit-box-orient vertical
|
156
146
|
width 30%
|
157
147
|
|
158
|
-
&.aplayer-list-author
|
148
|
+
&.aplayer-list-author
|
159
149
|
opacity 0.6
|
160
150
|
overflow hidden
|
161
151
|
text-overflow ellipsis
|
@@ -173,17 +163,17 @@ body[data-type=music]
|
|
173
163
|
-webkit-box-orient vertical
|
174
164
|
margin-left auto
|
175
165
|
|
176
|
-
.aplayer-list-index
|
166
|
+
.aplayer-list-index
|
177
167
|
line-height 32px
|
178
168
|
opacity 0.6
|
179
169
|
|
180
|
-
&::-webkit-scrollbar-thumb
|
170
|
+
&::-webkit-scrollbar-thumb
|
181
171
|
background-color var(--efu-white-op)
|
182
172
|
|
183
173
|
.aplayer-list
|
184
174
|
transition none
|
185
175
|
|
186
|
-
.aplayer-pic
|
176
|
+
.aplayer-pic
|
187
177
|
float none
|
188
178
|
width 60px
|
189
179
|
height 60px
|
@@ -195,17 +185,17 @@ body[data-type=music]
|
|
195
185
|
z-index 999
|
196
186
|
display none
|
197
187
|
|
198
|
-
.aplayer-info
|
188
|
+
.aplayer-info
|
199
189
|
margin 0 20px 0 20px
|
200
190
|
border-bottom none
|
201
191
|
|
202
|
-
.aplayer-music
|
192
|
+
.aplayer-music
|
203
193
|
display none
|
204
194
|
|
205
195
|
+maxWidth798()
|
206
196
|
display flex
|
207
197
|
position fixed
|
208
|
-
top
|
198
|
+
top calc(var(--vh) - 178px)
|
209
199
|
left 0
|
210
200
|
margin 0
|
211
201
|
margin-left 32px
|
@@ -238,29 +228,22 @@ body[data-type=music]
|
|
238
228
|
line-height 1
|
239
229
|
color #fff
|
240
230
|
|
241
|
-
.aplayer-lrc
|
242
|
-
padding-top
|
243
|
-
height
|
244
|
-
|
245
|
-
+maxWidth798()
|
246
|
-
margin-top 0
|
247
|
-
height auto
|
248
|
-
min-height 100%
|
249
|
-
mask-image linear-gradient(to bottom, #000, #000, #000, #000, #0000, #0000)
|
250
|
-
padding-top 100px
|
231
|
+
.aplayer-lrc
|
232
|
+
padding-top 24%
|
233
|
+
height var(--vh)
|
251
234
|
|
252
235
|
&:hover
|
253
236
|
p
|
254
237
|
filter blur(0px)
|
255
238
|
|
256
|
-
p
|
239
|
+
p
|
257
240
|
font-size 36px
|
258
241
|
line-height 44px !important
|
259
242
|
height 44px !important
|
260
243
|
margin-bottom 36px !important
|
261
244
|
color #fff
|
262
245
|
font-weight bold
|
263
|
-
text-align
|
246
|
+
text-align left
|
264
247
|
filter blur(2px)
|
265
248
|
opacity 0.3
|
266
249
|
transition all 0.9s cubic-bezier(0.56, 0.17, 0.22, 0.76)
|
@@ -274,17 +257,17 @@ body[data-type=music]
|
|
274
257
|
line-height 42px
|
275
258
|
height 42px
|
276
259
|
|
277
|
-
&.aplayer-lrc-current
|
260
|
+
&.aplayer-lrc-current
|
278
261
|
filter blur(0px)
|
279
262
|
opacity 1
|
280
263
|
transition all 0.3s cubic-bezier(0.56, 0.17, 0.22, 0.76), text-shadow 8s 4s ease-in
|
281
264
|
height fit-content !important
|
282
265
|
text-shadow 0 4px 4px #ffffff94
|
283
266
|
|
284
|
-
&:first-child
|
267
|
+
&:first-child
|
285
268
|
text-shadow 0 4px 4px #ffffff00
|
286
269
|
|
287
|
-
.aplayer-controller
|
270
|
+
.aplayer-controller
|
288
271
|
position fixed
|
289
272
|
max-width 1400px
|
290
273
|
margin auto
|
@@ -299,21 +282,21 @@ body[data-type=music]
|
|
299
282
|
width 100%
|
300
283
|
bottom 120px
|
301
284
|
|
302
|
-
.aplayer-bar-wrap
|
285
|
+
.aplayer-bar-wrap
|
303
286
|
margin 0 160px 0 150px
|
304
287
|
|
305
288
|
+maxWidth798()
|
306
289
|
margin 0 32px
|
307
290
|
|
308
|
-
.aplayer-played
|
291
|
+
.aplayer-played
|
309
292
|
background var(--efu-white) !important
|
310
293
|
|
311
|
-
.aplayer-thumb
|
294
|
+
.aplayer-thumb
|
312
295
|
-webkit-transform none
|
313
296
|
transform none
|
314
297
|
background #fff !important
|
315
298
|
|
316
|
-
.aplayer-time
|
299
|
+
.aplayer-time
|
317
300
|
position absolute
|
318
301
|
width 100%
|
319
302
|
bottom 26px
|
@@ -325,16 +308,16 @@ body[data-type=music]
|
|
325
308
|
bottom -40px
|
326
309
|
align-items center
|
327
310
|
|
328
|
-
.aplayer-icon
|
311
|
+
.aplayer-icon
|
329
312
|
width 1.8rem
|
330
313
|
height 1.8rem
|
331
314
|
margin-left 16px
|
332
315
|
|
333
|
-
path
|
316
|
+
path
|
334
317
|
fill var(--efu-white)
|
335
318
|
opacity 0.8
|
336
319
|
|
337
|
-
.aplayer-time-inner
|
320
|
+
.aplayer-time-inner
|
338
321
|
margin-right 18px
|
339
322
|
margin-top -8px
|
340
323
|
|
@@ -343,7 +326,7 @@ body[data-type=music]
|
|
343
326
|
width 100%
|
344
327
|
margin-right 4px
|
345
328
|
margin-top -60px
|
346
|
-
|
329
|
+
|
347
330
|
.aplayer-dtime
|
348
331
|
position absolute
|
349
332
|
right 30px
|
@@ -352,7 +335,7 @@ body[data-type=music]
|
|
352
335
|
position absolute
|
353
336
|
left 44px
|
354
337
|
|
355
|
-
.aplayer-icon-back
|
338
|
+
.aplayer-icon-back
|
356
339
|
position absolute
|
357
340
|
left 0
|
358
341
|
display inline
|
@@ -361,7 +344,7 @@ body[data-type=music]
|
|
361
344
|
margin auto
|
362
345
|
right 110px
|
363
346
|
|
364
|
-
.aplayer-icon-play
|
347
|
+
.aplayer-icon-play
|
365
348
|
position absolute
|
366
349
|
left 40px
|
367
350
|
display inline
|
@@ -373,7 +356,7 @@ body[data-type=music]
|
|
373
356
|
width 56px
|
374
357
|
height 56px
|
375
358
|
|
376
|
-
.aplayer-icon-forward
|
359
|
+
.aplayer-icon-forward
|
377
360
|
position absolute
|
378
361
|
left 80px
|
379
362
|
display inline
|
@@ -399,7 +382,7 @@ body[data-type=music]
|
|
399
382
|
height 24px
|
400
383
|
opacity 0.4
|
401
384
|
|
402
|
-
.aplayer-icon-menu
|
385
|
+
.aplayer-icon-menu
|
403
386
|
display none
|
404
387
|
|
405
388
|
+maxWidth798()
|
@@ -411,7 +394,7 @@ body[data-type=music]
|
|
411
394
|
height 24px
|
412
395
|
opacity 0.4
|
413
396
|
|
414
|
-
.aplayer-list
|
397
|
+
.aplayer-list
|
415
398
|
width 40%
|
416
399
|
max-width 480px
|
417
400
|
max-height none !important
|
@@ -422,7 +405,7 @@ body[data-type=music]
|
|
422
405
|
position fixed
|
423
406
|
z-index 1002
|
424
407
|
width 100%
|
425
|
-
bottom
|
408
|
+
bottom 0
|
426
409
|
left 0
|
427
410
|
background var(--efu-white)
|
428
411
|
border-radius 16px 16px 0 0
|
@@ -440,10 +423,10 @@ body[data-type=music]
|
|
440
423
|
overflow inherit
|
441
424
|
|
442
425
|
&:after,
|
443
|
-
&:before
|
426
|
+
&:before
|
444
427
|
display none
|
445
428
|
|
446
|
-
.aplayer-lrc-contents
|
429
|
+
.aplayer-lrc-contents
|
447
430
|
width 90%
|
448
431
|
margin-left auto
|
449
432
|
transition all .5s cubic-bezier(0.49, 0.21, 0.22, 0.84)
|
@@ -452,28 +435,28 @@ body[data-type=music]
|
|
452
435
|
+maxWidth798()
|
453
436
|
width 100%
|
454
437
|
|
455
|
-
.aplayer-info
|
456
|
-
.aplayer-controller
|
457
|
-
.aplayer-bar-wrap
|
458
|
-
.aplayer-bar
|
438
|
+
.aplayer-info
|
439
|
+
.aplayer-controller
|
440
|
+
.aplayer-bar-wrap
|
441
|
+
.aplayer-bar
|
459
442
|
height 8px
|
460
443
|
border-radius 8px
|
461
444
|
background var(--efu-white-op)
|
462
445
|
|
463
|
-
.aplayer-loaded
|
446
|
+
.aplayer-loaded
|
464
447
|
background var(--efu-white-op)
|
465
448
|
height 8px
|
466
449
|
border-radius 8px
|
467
450
|
|
468
|
-
.aplayer-played
|
451
|
+
.aplayer-played
|
469
452
|
height 8px
|
470
453
|
border-radius 8px
|
471
454
|
|
472
|
-
.aplayer-thumb
|
455
|
+
.aplayer-thumb
|
473
456
|
height 16px
|
474
457
|
width 16px
|
475
458
|
|
476
|
-
.aplayer-time
|
459
|
+
.aplayer-time
|
477
460
|
color var(--efu-white)
|
478
461
|
|
479
462
|
|
@@ -499,7 +482,7 @@ body[data-type=music]
|
|
499
482
|
|
500
483
|
.aplayer-icon-volume-down
|
501
484
|
display block
|
502
|
-
|
485
|
+
|
503
486
|
+maxWidth798()
|
504
487
|
display none
|
505
488
|
|
@@ -1 +1 @@
|
|
1
|
-
@keyframes snackbar-progress{0%{width:0}to{width:100%}}.snackbar-container{transition:all .5s ease;font-family:Roboto,sans-serif;font-size:14px;position:fixed;align-items:center;line-height:22px;padding:18px 24px;bottom:-100px;top:-100px;opacity:0;z-index:9999;background:var(--efu-lighttext)!important;color:var(--efu-card-bg);border-radius:0;display:flex;justify-content:center;max-width:none;min-width:100%!important;margin:0!important;left:0!important;height:60px;transform:none!important}.snackbar-container p{color:var(--efu-card-bg)!important;font-weight:700!important;text-align:center;font-size:.8rem!important;display:flex;justify-content:center}.snackbar-container .action{display:inline-block;font-size:inherit;margin:0 0 0 24px;min-width:min-content;cursor:pointer;color:var(--efu-card-bg);background:var(--efu-lighttext);padding:4px 6px;font-weight:700;border-radius:8px;transition:.3s;border:var(--style-border)}.snackbar-container .action:hover{background:var(--efu-card-bg);color:var(--efu-lighttext)}.snackbar-container:after{position:absolute;width:0;height:100%;left:0;top:0;background:var(--efu-white);opacity:.1;content:"";animation:snackbar-progress var(--efu-snackbar-time) linear forwards;pointer-events:none}@media (min-width:640px){.snackbar-container{min-width:288px;max-width:568px;display:inline-flex;border-radius:2px;margin:24px}}@media (max-width:640px){.snackbar-container{left:0;right:0;width:100%}}.snackbar-pos.bottom-center{top:auto!important;bottom:0;left:50%;transform:translate(-50%,0)}.snackbar-pos.bottom-left{top:auto!important;bottom:0;left:0}.snackbar-pos.bottom-right{top:auto!important;bottom:0;right:0}.snackbar-pos.top-center,.snackbar-pos.top-left{bottom:auto!important;top:0;left:0}.snackbar-pos.top-center{left:50%;transform:translate(-50%,0)}.snackbar-pos.top-right{bottom:auto!important;top:0;right:0}@media (max-width:640px){.snackbar-pos.bottom-center,.snackbar-pos.top-center{left:0;transform:none}}
|
1
|
+
@keyframes snackbar-progress{0%{width:0}to{width:100%}}.snackbar-container{transition:all .5s ease;font-family:Roboto,sans-serif;font-size:14px;position:fixed;align-items:center;line-height:22px;padding:18px 24px;bottom:-100px;top:-100px;opacity:0;z-index:9999;background:var(--efu-lighttext)!important;color:var(--efu-card-bg);border-radius:0;display:flex;justify-content:center;max-width:none;min-width:100%!important;margin:0!important;left:0!important;height:60px;transform:none!important}.snackbar-container p{color:var(--efu-card-bg)!important;font-weight:700!important;text-align:center;font-size:.8rem!important;display:flex;justify-content:center}.snackbar-container .action{display:inline-block;font-size:inherit;margin:0 0 0 24px;min-width:min-content;cursor:pointer;color:var(--efu-card-bg) !important;background:var(--efu-lighttext);padding:4px 6px;font-weight:700;border-radius:8px;transition:.3s;border:var(--style-border)}.snackbar-container .action:hover{background:var(--efu-card-bg);color:var(--efu-lighttext) !important}.snackbar-container:after{position:absolute;width:0;height:100%;left:0;top:0;background:var(--efu-white);opacity:.1;content:"";animation:snackbar-progress var(--efu-snackbar-time) linear forwards;pointer-events:none}@media (min-width:640px){.snackbar-container{min-width:288px;max-width:568px;display:inline-flex;border-radius:2px;margin:24px}}@media (max-width:640px){.snackbar-container{left:0;right:0;width:100%}}.snackbar-pos.bottom-center{top:auto!important;bottom:0;left:50%;transform:translate(-50%,0)}.snackbar-pos.bottom-left{top:auto!important;bottom:0;left:0}.snackbar-pos.bottom-right{top:auto!important;bottom:0;right:0}.snackbar-pos.top-center,.snackbar-pos.top-left{bottom:auto!important;top:0;left:0}.snackbar-pos.top-center{left:50%;transform:translate(-50%,0)}.snackbar-pos.top-right{bottom:auto!important;top:0;right:0}@media (max-width:640px){.snackbar-pos.bottom-center,.snackbar-pos.top-center{left:0;transform:none}}
|
package/source/js/main.js
CHANGED
package/source/js/music.js
CHANGED
@@ -0,0 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* Barrage Comment
|
3
|
+
* author: @efuo
|
4
|
+
* date: 2024-04-28
|
5
|
+
*/
|
6
|
+
function _0x2736(_0x423b83,_0x26de1b){const _0x562b41=_0x562b();return _0x2736=function(_0x2736dc,_0x1e863c){_0x2736dc=_0x2736dc-0x11f;let _0x1c44ad=_0x562b41[_0x2736dc];return _0x1c44ad;},_0x2736(_0x423b83,_0x26de1b);}const _0xf096ba=_0x2736;(function(_0x244294,_0x51eb5a){const _0x2047ac=_0x2736,_0x461abb=_0x244294();while(!![]){try{const _0x362f69=-parseInt(_0x2047ac(0x12f))/0x1+-parseInt(_0x2047ac(0x126))/0x2+-parseInt(_0x2047ac(0x120))/0x3+-parseInt(_0x2047ac(0x15b))/0x4+parseInt(_0x2047ac(0x13c))/0x5+parseInt(_0x2047ac(0x153))/0x6*(parseInt(_0x2047ac(0x15c))/0x7)+parseInt(_0x2047ac(0x132))/0x8*(parseInt(_0x2047ac(0x152))/0x9);if(_0x362f69===_0x51eb5a)break;else _0x461abb['push'](_0x461abb['shift']());}catch(_0x59d2ed){_0x461abb['push'](_0x461abb['shift']());}}}(_0x562b,0xa9d59));class Barrage{constructor(_0x35d098){const _0xc51bb8=_0x2736;this['comments']=_0x35d098,this[_0xc51bb8(0x136)]=document[_0xc51bb8(0x15a)](_0xc51bb8(0x142)),this[_0xc51bb8(0x12c)]=[],this[_0xc51bb8(0x133)]=0x0,this[_0xc51bb8(0x139)]=[],this[_0xc51bb8(0x14b)]=![],this[_0xc51bb8(0x146)]();}[_0xf096ba(0x13e)]=_0x50912d=>{const _0x243af9=_0xf096ba;return _0x50912d['flatMap'](_0x18bbb5=>_0x18bbb5[_0x243af9(0x14a)]?[_0x18bbb5,...this['filterAndFlatten'](_0x18bbb5[_0x243af9(0x14a)])]:[_0x18bbb5]);};[_0xf096ba(0x135)](_0x25b918){const _0x4cf7a3=_0xf096ba;return _0x25b918[_0x4cf7a3(0x124)](/(<([^>]+)>)/ig,'')[_0x4cf7a3(0x12e)]();}[_0xf096ba(0x147)](_0x3c5b88){const _0x58f618=_0xf096ba,_0x1c09f9=this[_0x58f618(0x135)](_0x3c5b88[_0x58f618(0x156)]);if(!_0x1c09f9)return![];const _0xbed29a=document[_0x58f618(0x127)]('div');return _0xbed29a[_0x58f618(0x122)]=_0x58f618(0x138),_0xbed29a[_0x58f618(0x12d)]='<div\x20class=\x22barrageHead\x22><a\x20class=\x22barrageTitle\x22\x20href=\x22javascript:sco.scrollTo(\x27post-comment\x27)\x22>'+GLOBAL_CONFIG[_0x58f618(0x125)][_0x58f618(0x158)][_0x58f618(0x134)]+_0x58f618(0x140)+_0x3c5b88['nick']+_0x58f618(0x149)+GLOBAL_CONFIG[_0x58f618(0x130)][_0x58f618(0x13b)]+_0x58f618(0x143)+_0x3c5b88[_0x58f618(0x131)]+_0x58f618(0x14d)+(_0x3c5b88['id']?_0x58f618(0x14f)+_0x3c5b88['id']+'\x27)':'javascript:sco.scrollTo(\x27post-comment\x27)')+'\x22>'+_0x1c09f9+_0x58f618(0x11f),this[_0x58f618(0x136)][_0x58f618(0x155)](_0xbed29a),this[_0x58f618(0x139)][_0x58f618(0x12a)](_0xbed29a),!![];}[_0xf096ba(0x141)](_0x4142a6){const _0x5da976=_0xf096ba;_0x4142a6[_0x5da976(0x13a)][_0x5da976(0x14e)](_0x5da976(0x13f)),setTimeout(()=>this[_0x5da976(0x136)][_0x5da976(0x121)](_0x4142a6),0x3e8);}[_0xf096ba(0x154)](){const _0x3d0cb8=_0xf096ba;if(this['barrageList'][_0x3d0cb8(0x159)]&&!this[_0x3d0cb8(0x14b)]){if(!this[_0x3d0cb8(0x147)](this['barrageList'][this[_0x3d0cb8(0x133)]]))return this[_0x3d0cb8(0x133)]=(this[_0x3d0cb8(0x133)]+0x1)%this[_0x3d0cb8(0x12c)][_0x3d0cb8(0x159)],this[_0x3d0cb8(0x154)]();this[_0x3d0cb8(0x133)]=(this[_0x3d0cb8(0x133)]+0x1)%this['barrageList'][_0x3d0cb8(0x159)];}this[_0x3d0cb8(0x139)][_0x3d0cb8(0x159)]>Math['min'](0x1,this['barrageList'][_0x3d0cb8(0x159)])&&!this[_0x3d0cb8(0x14b)]&&this[_0x3d0cb8(0x141)](this['barrageTimer'][_0x3d0cb8(0x150)]());}['initBarrage'](){const _0x571de5=_0xf096ba,_0x2e2e3e=utils[_0x571de5(0x157)][_0x571de5(0x137)](_0x571de5(0x128));this[_0x571de5(0x136)]['style']['display']=_0x2e2e3e?_0x571de5(0x13d):_0x571de5(0x144),this[_0x571de5(0x12c)]=this['filterAndFlatten'](this[_0x571de5(0x145)]),this[_0x571de5(0x136)][_0x571de5(0x12d)]='',clearInterval(this['commentInterval']),this[_0x571de5(0x14c)]=setInterval(()=>this[_0x571de5(0x154)](),0x1388);}[_0xf096ba(0x146)](){const _0x81bb1e=_0xf096ba;this['initBarrage'](),this['dom'][_0x81bb1e(0x148)]('mouseover',()=>this['hoverOnCommentBarrage']=!![]),this[_0x81bb1e(0x136)][_0x81bb1e(0x148)](_0x81bb1e(0x151),()=>this[_0x81bb1e(0x14b)]=![]);}[_0xf096ba(0x123)](){const _0x569798=_0xf096ba;clearInterval(this[_0x569798(0x14c)]),this[_0x569798(0x136)][_0x569798(0x129)]('mouseover',()=>this[_0x569798(0x14b)]=!![]),this[_0x569798(0x136)][_0x569798(0x129)](_0x569798(0x151),()=>this['hoverOnCommentBarrage']=![]),this[_0x569798(0x136)][_0x569798(0x12d)]='';}}function _0x562b(){const _0x3031bd=['</div><img\x20class=\x22barrageAvatar\x22\x20src=\x22','replies','hoverOnCommentBarrage','commentInterval','\x22/><a\x20class=\x22comment-barrage-close\x22\x20href=\x22javascript:sco.switchCommentBarrage();\x22><i\x20class=\x22solitude\x20st-close-fill\x22></i></a></div><a\x20class=\x22barrageContent\x22\x20href=\x22','add','javascript:sco.scrollTo(\x27','shift','mouseout','10792323NNfVVh','32478HpqMfw','manageBarrage','appendChild','content','saveToLocal','barrage','length','querySelector','209952OxSGhj','854DBnOiw','</a>','3742368aCgLQg','removeChild','className','destroy','replace','lang','1438760uXBNRa','createElement','commentBarrageSwitch','removeEventListener','push','currentBarrage','barrageList','innerHTML','trim','271090IyHbzI','comment','mailMd5','8MDfQRc','barrageIndex','title','sanitizeContent','dom','get','comment-barrage-item','barrageTimer','classList','avatar','5632610YtcmxI','flex','filterAndFlatten','out','</a><div\x20class=\x22barrageNick\x22>','removeBarrageItem','.comment-barrage','/avatar/','none','comments','init','createBarrageItem','addEventListener'];_0x562b=function(){return _0x3031bd;};return _0x562b();}function initializeCommentBarrage(_0x506af1){const _0x438d69=_0xf096ba;if(_0x506af1[_0x438d69(0x159)]===0x0)return;let _0x6d138e=window[_0x438d69(0x12b)];if(_0x6d138e)_0x6d138e[_0x438d69(0x123)]();window[_0x438d69(0x12b)]=new Barrage(_0x506af1);}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
|
-
*
|
3
|
-
*
|
4
|
-
*
|
2
|
+
* efuAI
|
3
|
+
* author: @efuo
|
4
|
+
* version: 1.0.0
|
5
5
|
*/
|
6
|
-
class efuAI{constructor(){this
|
6
|
+
const _0x13613d=_0x413b;function _0x413b(_0x2b151b,_0x2765b5){const _0x2e2ac7=_0x2e2a();return _0x413b=function(_0x413be1,_0x2731a7){_0x413be1=_0x413be1-0x6a;let _0x48e6e4=_0x2e2ac7[_0x413be1];return _0x48e6e4;},_0x413b(_0x2b151b,_0x2765b5);}(function(_0x23c5ad,_0x1d8983){const _0x4a3867=_0x413b,_0x549d7e=_0x23c5ad();while(!![]){try{const _0x23e9f6=parseInt(_0x4a3867(0xa9))/0x1*(-parseInt(_0x4a3867(0x95))/0x2)+parseInt(_0x4a3867(0x7d))/0x3*(-parseInt(_0x4a3867(0x83))/0x4)+-parseInt(_0x4a3867(0xb2))/0x5*(parseInt(_0x4a3867(0xb7))/0x6)+-parseInt(_0x4a3867(0x77))/0x7*(-parseInt(_0x4a3867(0x72))/0x8)+parseInt(_0x4a3867(0x7e))/0x9+-parseInt(_0x4a3867(0xb8))/0xa+parseInt(_0x4a3867(0x9f))/0xb*(parseInt(_0x4a3867(0x6f))/0xc);if(_0x23e9f6===_0x1d8983)break;else _0x549d7e['push'](_0x549d7e['shift']());}catch(_0xf0b15c){_0x549d7e['push'](_0x549d7e['shift']());}}}(_0x2e2a,0x24be2));class efuAI{constructor(){const _0x5c45b1=_0x413b;this[_0x5c45b1(0x98)]=_0x5c45b1(0xb1),this[_0x5c45b1(0x84)]=!0x1,this[_0x5c45b1(0x7c)]='',this[_0x5c45b1(0x8a)]=GLOBAL_CONFIG[_0x5c45b1(0xb3)],this[_0x5c45b1(0x90)]=!0x1;}['init'](){const _0x185d66=_0x413b;this[_0x185d66(0x90)]=!0x1,this[_0x185d66(0x7c)]=PAGE_CONFIG[_0x185d66(0x87)]?PAGE_CONFIG[_0x185d66(0x87)]+'':![],!this['aiPostExplanation']?this[_0x185d66(0xa6)]():this[_0x185d66(0x76)](Promise[_0x185d66(0x78)](this[_0x185d66(0x7c)])),this['AIEngine']();}['getTitleAndContent'](){const _0x1c05d3=_0x413b,_0x497431=document['getElementById'](_0x1c05d3(0x6d)),_0x1134ec=document[_0x1c05d3(0xb4)],_0x30a3a2=_0x497431[_0x1c05d3(0xa3)]('p'),_0x2d35eb=_0x497431['querySelectorAll'](_0x1c05d3(0x80));return(_0x1134ec+'\x20'+Array[_0x1c05d3(0xa0)](_0x2d35eb)[_0x1c05d3(0x9d)](Array[_0x1c05d3(0xa0)](_0x30a3a2))[_0x1c05d3(0x74)](_0x25a656=>_0x25a656[_0x1c05d3(0x88)][_0x1c05d3(0x86)](/https?:\/\/[^\s]+/g,''))[_0x1c05d3(0xac)]('\x20'))[_0x1c05d3(0xb0)](0x0,0x3e8);}async[_0x13613d(0xa6)](){const _0x23a9bd=_0x13613d;this[_0x23a9bd(0x76)](this['fetch'](document[_0x23a9bd(0xb4)],this[_0x23a9bd(0x96)](),this['config'][_0x23a9bd(0xaf)]));}async[_0x13613d(0x8f)](_0x22e80e,_0x3dcc90,_0x24437c){const _0xaf00b3=_0x13613d,_0x565c45=this[_0xaf00b3(0x98)]+'/?content='+encodeURIComponent(_0x3dcc90)+_0xaf00b3(0x7a)+_0x22e80e+_0xaf00b3(0x75)+encodeURIComponent(_0x24437c)+_0xaf00b3(0x92)+encodeURIComponent(window[_0xaf00b3(0x9e)][_0xaf00b3(0xad)]),_0x460d6f=await fetch(_0x565c45),_0x1b4076=await _0x460d6f[_0xaf00b3(0xa4)]();return _0x460d6f['ok']?(this[_0xaf00b3(0x7c)]=_0x1b4076['summary'],_0x1b4076['summary']):(console[_0xaf00b3(0xa1)]('Request\x20failed:',_0x1b4076[_0xaf00b3(0xa8)]),_0x1b4076['err_msg']);}['aiShowAnimation'](_0xad4d41,_0x42d337=!0x1){const _0x59e5bb=_0x13613d,_0x3e9d86=document[_0x59e5bb(0x8e)](_0x59e5bb(0x70)),_0xd29cf1=document[_0x59e5bb(0x8e)](_0x59e5bb(0xb5));if(!_0x3e9d86||this[_0x59e5bb(0x90)])return;this[_0x59e5bb(0x90)]=!0x0,this[_0x59e5bb(0x8c)](),_0xd29cf1[_0x59e5bb(0x8b)][_0x59e5bb(0x9b)](_0x59e5bb(0x85)),_0x3e9d86[_0x59e5bb(0x93)][_0x59e5bb(0x9a)]='block',_0x3e9d86[_0x59e5bb(0x7b)]=_0x59e5bb(0x89),setTimeout(()=>{const _0x40cf66=_0x59e5bb;let _0x214250,_0x4a5de1,_0x4f6a34=!0x0,_0x238416=0x0,_0x1792a7=!0x0;const _0x24b6fe=new IntersectionObserver(_0x46a81a=>{const _0x30414d=_0x413b;_0x4f6a34=_0x46a81a[0x0][_0x30414d(0x6e)],_0x4f6a34&&requestAnimationFrame(_0x4a5de1);},{'threshold':0x0});_0xad4d41['then'](_0x12449a=>{const _0x4a1249=_0x413b;_0x214250=performance[_0x4a1249(0xa7)](),_0x4a5de1=()=>{const _0x12a8a9=_0x4a1249;if(_0x238416<_0x12449a[_0x12a8a9(0x73)]&&_0x4f6a34){const _0x27454f=performance[_0x12a8a9(0xa7)](),_0x2ece04=_0x27454f-_0x214250,_0x493a62=_0x12449a['slice'](_0x238416,_0x238416+0x1),_0x29dd3e=/[,。!、?,.!?]/[_0x12a8a9(0x91)](_0x493a62),_0x323f23=/[a-zA-Z0-9]/[_0x12a8a9(0x91)](_0x493a62);_0x2ece04>=(_0x29dd3e?0x64*Math['random']()+0x64:_0x323f23?0xa:0x19)&&(_0x3e9d86[_0x12a8a9(0x88)]=_0x12449a[_0x12a8a9(0xb0)](0x0,_0x238416+0x1),_0x214250=_0x27454f,_0x238416++,_0x238416<_0x12449a[_0x12a8a9(0x73)]?_0x3e9d86[_0x12a8a9(0x7b)]=_0x12449a[_0x12a8a9(0xb0)](0x0,_0x238416)+_0x12a8a9(0x79):(_0x3e9d86['innerHTML']=_0x12449a,_0x3e9d86['style'][_0x12a8a9(0x9a)]='block',this[_0x12a8a9(0x90)]=!0x1,_0xd29cf1[_0x12a8a9(0x8b)]['remove'](_0x12a8a9(0x85)),_0x24b6fe[_0x12a8a9(0x82)](),_0x42d337&&this[_0x12a8a9(0x6a)]())),_0x4f6a34&&requestAnimationFrame(_0x4a5de1);}},_0x4f6a34&&_0x1792a7&&setTimeout(()=>{requestAnimationFrame(_0x4a5de1),_0x1792a7=!0x1;},0xbb8),_0x24b6fe['observe'](_0x3e9d86);})[_0x40cf66(0xab)](_0x497c7f=>{const _0x16a888=_0x40cf66;console[_0x16a888(0xa1)](_0x16a888(0x6c),_0x497c7f),_0x3e9d86[_0x16a888(0x7b)]='检索信息失败',_0x3e9d86['style'][_0x16a888(0x9a)]=_0x16a888(0x97),this[_0x16a888(0x90)]=!0x1,_0xd29cf1[_0x16a888(0x8b)][_0x16a888(0xa5)](_0x16a888(0x85)),_0x24b6fe[_0x16a888(0x82)]();});},0xbb8);}[_0x13613d(0x71)](){const _0xa48776=_0x13613d,_0x294414=document[_0xa48776(0x8e)](_0xa48776(0xb5));_0x294414&&_0x294414['addEventListener'](_0xa48776(0xa2),()=>{const _0x5e3005=_0xa48776;this['scoGPTIsRunning']||(this[_0x5e3005(0x84)]=!0x0,this['aiShowAnimation'](Promise['resolve'](this['config'][_0x5e3005(0xae)]),!0x0));});}[_0x13613d(0x8c)](){const _0x4e5582=_0x13613d,_0x355d20=document[_0x4e5582(0x8e)](_0x4e5582(0xb6));_0x355d20?_0x355d20[_0x4e5582(0x7b)]='':console[_0x4e5582(0xa1)](_0x4e5582(0xaa));}['createSuggestions'](){const _0x1196c6=_0x13613d;this[_0x1196c6(0x84)]&&(this[_0x1196c6(0x8c)](),this[_0x1196c6(0x99)](_0x1196c6(0x81),()=>{const _0x2d4131=_0x1196c6;''===this[_0x2d4131(0x7c)]?this[_0x2d4131(0xa6)]():this[_0x2d4131(0x76)](Promise[_0x2d4131(0x78)](this[_0x2d4131(0x7c)]),!0x0);}),this[_0x1196c6(0x8a)][_0x1196c6(0xb9)]&&this['createSuggestionItemWithAction']('带我去看看其他文章',()=>toRandomPost()),this[_0x1196c6(0x84)]=!0x0);}['createSuggestionItemWithAction'](_0x411977,_0x1ee9c4){const _0x15cc5f=_0x13613d,_0x5e399f=document[_0x15cc5f(0x8e)](_0x15cc5f(0xb6));if(!_0x5e399f)return void console['error']('无法找到具有class为ai-suggestions的元素');const _0x504608=document[_0x15cc5f(0x6b)]('div');_0x504608['classList'][_0x15cc5f(0x9b)](_0x15cc5f(0x94)),_0x504608[_0x15cc5f(0x9c)]=_0x411977,_0x504608[_0x15cc5f(0x7f)](_0x15cc5f(0xa2),_0x1ee9c4),_0x5e399f[_0x15cc5f(0x8d)](_0x504608);}}function _0x2e2a(){const _0x17cf3e=['loadingAI','replace','ai_text','innerText','生成中...<span\x20class=\x22blinking-cursor\x22></span>','config','classList','cleanSuggestions','appendChild','querySelector','fetch','scoGPTIsRunning','test','&url=','style','ai-suggestions-item','6YFtYAZ','getTitleAndContent','block','root','createSuggestionItemWithAction','display','add','textContent','concat','location','11mBQjxP','from','error','click','getElementsByTagName','json','remove','generate','now','err_msg','95089WLUpyk','没有这个元素:\x27ai-suggestions\x27','catch','join','href','talk','key','slice','https://summary.tianli0.top','106175QRactq','post_ai','title','.ai-tag','.ai-suggestions','66dgrcvD','2694560CoUACr','randomPost','createSuggestions','createElement','检索信息失败:','article-container','isIntersecting','11202588AcRnYR','.ai-explanation','AIEngine','32wwjFQL','length','map','&key=','aiShowAnimation','238161ujxgZE','resolve','<span\x20class=\x22blinking-cursor\x22></span>','&title=','innerHTML','aiPostExplanation','28326zDzbwu','267111zRGBLY','addEventListener','h1,\x20h2,\x20h3,\x20h4,\x20h5','这篇文章讲了什么?','disconnect','68AXICSD','aiTalkMode'];_0x2e2a=function(){return _0x17cf3e;};return _0x2e2a();}const efu_ai=new efuAI();
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* EasyDanmaku v1.0.0
|
3
|
+
* author: Leonus
|
4
|
+
*/
|
5
|
+
class EasyDanmaku{constructor(t){this.container=this.checkParams(t),this.pathname=t.page||null,this.wrapperStyle=t.wrapperStyle||null,this.line=t.line||10,this.speed=t.speed||5,this.runtime=t.runtime||10,this.colourful=t.colourful||!1,this.loop=t.loop||!1,this.hover=t.hover||!1,this.coefficient=t.coefficient||1.38,this.originIndex=0,this.originList=null,this.offsetValue=this.container.offsetHeight/this.line,this.vipIndex=0,this.overflowArr=[],this.clearIng=!1,this.cleartimer=null,this.init(),this.handleEvents(t)}handleEvents(t){this.onComplete=t.onComplete||null,this.onHover=t.onHover||null}init(){this.runstatus=1,this.aisle=[],this.container.style.overflow="hidden",this.hover&&this.handleMouseHover(),"relative"!==Utils.getStyle(this.container,"position")&&"fixed"!==Utils.getStyle(this.container,"position")&&(this.container.style.position="relative");for(let t=0;t<this.line;t++)this.aisle.push({normalRow:!0,vipRow:!0})}checkParams(t){if(!document.querySelector(t.el))throw`Could not find the ${t.el} element`;if(t.wrapperStyle&&"string"!=typeof t.wrapperStyle)throw"The type accepted by the wrapperStyle parameter is string";if(t.line&&"number"!=typeof t.line)throw"The type accepted by the line parameter is number";if(t.speed&&"number"!=typeof t.speed)throw"The type accepted by the speed parameter is number";if(t.colourful&&"boolean"!=typeof t.colourful)throw"The type accepted by the colourful parameter is boolean";if(t.runtime&&"number"!=typeof t.runtime)throw"The type accepted by the runtime parameter is number";if(t.loop&&"boolean"!=typeof t.loop)throw"The type accepted by the loop parameter is boolean";if(t.coefficient&&"number"!=typeof t.coefficient)throw"The type accepted by the coefficient parameter is number";if(t.hover&&"boolean"!=typeof t.hover)throw"The type accepted by the hover parameter is boolean";if(t.onComplete&&"function"!=typeof t.onComplete)throw"The type accepted by the onComplete parameter is function";if(t.onHover&&"function"!=typeof t.onHover)throw"The type accepted by the onHover parameter is function";return document.querySelector(t.el)}send(t,e=null,i=null){if(0==this.runstatus)return void this.overflowArr.push({content:t,normalClass:e});if(t.length<1)return;this.offsetValue=this.container.offsetHeight/this.line;let n=document.createElement("div"),r=0,s=this.speed,o=null,l=0;n.innerHTML=t,n.style.display="inline-block",n.classList.add("default-style"),(e||this.wrapperStyle)&&n.classList.add(e||this.wrapperStyle),function a(){if(r=Math.round(Math.random()*(this.line-1)),this.aisle[r].normalRow){this.aisle[r].normalRow=!1,this.container.appendChild(n),s+=n.offsetWidth/n.parentNode.offsetWidth*2,n.style.cssText=`\n text-align:center;\n min-width:130px;\n will-change: transform;\n position:absolute;\n right: -${n.offsetWidth+130}px;\n transition: transform ${s}s linear;\n transform: translateX(-${n.parentNode.offsetWidth+n.offsetWidth+130}px);\n top: ${r*this.offsetValue}px;\n line-height:${this.offsetValue}px;\n color:${this.colourful?"#"+("00000"+(16777216*Math.random()|0).toString(16)).substr(-6):void 0}\n `;let t=(n.parentNode.offsetWidth+n.offsetWidth)/s/60;o=setInterval((()=>{l+=t,l>n.offsetWidth*this.coefficient&&(this.aisle[r].normalRow=!0,clearInterval(o))}),16.66),setTimeout((()=>{1!=n.getAttribute("relieveDel")&&(i&&i({runtime:s,target:n,width:n.offsetWidth}),n.remove())}),1e3*s)}else{this.aisle.some((t=>!0===t.normalRow))?a.call(this):(()=>{this.overflowArr.push({content:t,normalClass:e}),this.clearIng||this.clearOverflowDanmakuArray()})()}}.call(this)}batchSend(t,e=!1,i=null){let n=this.runtime||1.23*t.length;this.originList=t,this.hasAvatar=e,this.normalClass=i;let r=setInterval((()=>{location.pathname!=this.pathname&&clearInterval(r),this.originIndex>t.length-1?(clearInterval(r),this.originIndex=0,this.onComplete&&this.onComplete(),this.loop&&this.batchSend(this.originList,e,i)):(e?this.send(`${t[this.originIndex].url?'<a href="'+t[this.originIndex].url+'">':""}<img src=${t[this.originIndex].avatar}>\n <p>${t[this.originIndex].content}</p>${t[this.originIndex].url?"</a>":""}\n `,i||this.wrapperStyle):this.send(t[this.originIndex],i||this.wrapperStyle),this.originIndex++)}),n/t.length*1e3)}centeredSend(t,e,i=3e3,n=null){let r=document.createElement("div"),s=0;r.innerHTML=t,(e||this.wrapperStyle)&&r.classList.add(e||this.wrapperStyle),function t(){if(this.aisle[s].vipRow)this.container.appendChild(r),r.style.cssText=`\n position:absolute;\n left:50%;\n transform:translateX(-50%);\n top: ${s*this.offsetValue}px;\n `,this.aisle[s].vipRow=!1,setTimeout((()=>{n&&n({duration:i,target:r,width:r.offsetWidth}),r.remove(),this.aisle[s].vipRow=!0}),i);else{if(s++,s>this.line-1)return;t.call(this)}}.call(this)}play(){const t=this.container.children;for(let e=0;e<t.length;e++)this.controlDanmakurunStatus(t[e],1);this.runstatus=1,0!==this.overflowArr.length&&this.clearOverflowDanmakuArray()}pause(){const t=this.container.children;for(let e=0;e<t.length;e++)this.controlDanmakurunStatus(t[e],0);this.runstatus=0}controlDanmakurunStatus(t,e){const i=0,n=/-(\S*),/;if(e===1){clearTimeout(t.timer);const e=Utils.getStyle(t,"transform").match(n)[1];t.style.transition=`transform ${this.speed}s linear`,t.style.transform=`translateX(-${t.parentNode.offsetWidth+parseInt(e)+t.offsetWidth+130}px)`,t.timer=setTimeout((()=>{t.remove()}),1e3*this.speed)}else if(e===i){clearTimeout(t.timer);const e=Utils.getStyle(t,"transform").match(n)[1];t.style.transition="transform 0s linear",t.style.transform=`translateX(-${e}px)`,t.setAttribute("relieveDel",1)}}handleMouseHover(){Utils.eventDelegation(this.container,"default-style","mouseover",(t=>{t.style["z-index"]=1e3,this.controlDanmakurunStatus(t,0),this.onHover&&this.onHover(t)})),Utils.eventDelegation(this.container,"default-style","mouseout",(t=>{t.style.zIndex=1,1==this.runstatus&&this.controlDanmakurunStatus(t,1)}))}clearOverflowDanmakuArray(){clearInterval(this.cleartimer),this.clearIng=!0;let t=0;this.cleartimer=setInterval((()=>{0===this.overflowArr.length?(t++,t>20&&(clearInterval(this.cleartimer),this.clearIng=!1)):(this.send(this.overflowArr[0].content,this.overflowArr[0].normalClass||this.wrapperStyle),this.overflowArr.shift())}),500)}}class Utils{static getStyle(t,e){return window.getComputedStyle(t,null)[e]}static eventDelegation(t,e,i,n){t.addEventListener(i,(t=>{try{t.target.className.includes(e)?n(t.target):t.target.parentNode.className.includes(e)&&n(t.target.parentNode)}catch(t){}}))}}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
+
* @name: Universe
|
2
3
|
* author: Leonus
|
3
|
-
* email: 990320751@qq.com
|
4
4
|
*/
|
5
5
|
function dark(){window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;var t,i,e,s,n=.05,h=document.getElementById("universe"),a=!0,o="226,225,224",r=[];function d(){t=window.innerWidth,i=window.innerHeight,e=.216*t,h.setAttribute("width",t),h.setAttribute("height",i)}function c(){s.clearRect(0,0,t,i);for(var e=r.length,n=0;n<e;n++){var h=r[n];h.move(),h.fadeIn(),h.fadeOut(),h.draw()}}function f(){this.reset=function(){this.giant=u(3),this.comet=!this.giant&&!a&&u(10),this.x=m(0,t-10),this.y=m(0,i),this.r=m(1.1,2.6),this.dx=m(n,6*n)+(this.comet+1-1)*n*m(50,120)+.1,this.dy=-m(n,6*n)-(this.comet+1-1)*n*m(50,120),this.fadingOut=null,this.fadingIn=!0,this.opacity=0,this.opacityTresh=m(.2,1-.4*(this.comet+1-1)),this.do=m(5e-4,.002)+.001*(this.comet+1-1)},this.fadeIn=function(){this.fadingIn&&(this.fadingIn=!(this.opacity>this.opacityTresh),this.opacity+=this.do)},this.fadeOut=function(){this.fadingOut&&(this.fadingOut=!(this.opacity<0),this.opacity-=this.do/2,(this.x>t||this.y<0)&&(this.fadingOut=!1,this.reset()))},this.draw=function(){if(s.beginPath(),this.giant)s.fillStyle="rgba(180,184,240,"+this.opacity+")",s.arc(this.x,this.y,2,0,2*Math.PI,!1);else if(this.comet){s.fillStyle="rgba("+o+","+this.opacity+")",s.arc(this.x,this.y,1.5,0,2*Math.PI,!1);for(var t=0;t<30;t++)s.fillStyle="rgba("+o+","+(this.opacity-this.opacity/20*t)+")",s.rect(this.x-this.dx/4*t,this.y-this.dy/4*t-2,2,2),s.fill()}else s.fillStyle="rgba(226,225,142,"+this.opacity+")",s.rect(this.x,this.y,this.r,this.r);s.closePath(),s.fill()},this.move=function(){this.x+=this.dx,this.y+=this.dy,!1===this.fadingOut&&this.reset(),(this.x>t-t/4||this.y<0)&&(this.fadingOut=!0)},setTimeout((function(){a=!1}),50)}function u(t){return Math.floor(1e3*Math.random())+1<10*t}function m(t,i){return Math.random()*(i-t)+t}d(),window.addEventListener("resize",d,!1),function(){s=h.getContext("2d");for(var t=0;t<e;t++)r[t]=new f,r[t].reset();c()}(),function t(){"dark"==document.getElementsByTagName("html")[0].getAttribute("data-theme")&&c(),window.requestAnimationFrame(t)}()}
|
@@ -1,127 +0,0 @@
|
|
1
|
-
.hexo-douban-items
|
2
|
-
display flex
|
3
|
-
flex-wrap wrap
|
4
|
-
gap 12px
|
5
|
-
flex-direction row
|
6
|
-
|
7
|
-
.hexo-douban-comment
|
8
|
-
display none
|
9
|
-
|
10
|
-
.hexo-douban-item
|
11
|
-
position relative
|
12
|
-
width calc(100% / 4 - 9px)
|
13
|
-
border-radius 12px
|
14
|
-
border var(--style-border)
|
15
|
-
box-shadow var(--efu-shadow-border)
|
16
|
-
background var(--efu-card-bg)
|
17
|
-
transition .3s
|
18
|
-
animation slide-in 0.6s 0.3s backwards
|
19
|
-
border var(--style-border)
|
20
|
-
margin 8px 0
|
21
|
-
height 160px
|
22
|
-
min-height 160px !important
|
23
|
-
overflow hidden
|
24
|
-
|
25
|
-
+maxWidth1200()
|
26
|
-
width calc(100% / 3 - 9px)
|
27
|
-
|
28
|
-
+maxWidth899()
|
29
|
-
width calc(100% / 2 - 9px)
|
30
|
-
|
31
|
-
+maxWidth600()
|
32
|
-
width 100%
|
33
|
-
|
34
|
-
&:hover
|
35
|
-
border-color var(--efu-main)
|
36
|
-
|
37
|
-
.hexo-douban-picture
|
38
|
-
width 120px
|
39
|
-
height 100%
|
40
|
-
top 0
|
41
|
-
padding 10px
|
42
|
-
|
43
|
-
img
|
44
|
-
margin 0
|
45
|
-
height 100%
|
46
|
-
max-width 100%
|
47
|
-
border-radius 6px
|
48
|
-
|
49
|
-
.hexo-douban-info
|
50
|
-
display flex
|
51
|
-
flex-wrap wrap
|
52
|
-
align-content flex-start
|
53
|
-
height 100%
|
54
|
-
position relative
|
55
|
-
|
56
|
-
.hexo-douban-rating
|
57
|
-
position absolute
|
58
|
-
bottom 5px
|
59
|
-
line-height 16px
|
60
|
-
|
61
|
-
.hexo-douban-meta
|
62
|
-
display -webkit-box
|
63
|
-
overflow hidden
|
64
|
-
-webkit-box-orient vertical
|
65
|
-
|
66
|
-
+maxWidth1300()
|
67
|
-
-webkit-line-clamp 3 !important
|
68
|
-
|
69
|
-
+maxWidth899()
|
70
|
-
-webkit-line-clamp 4 !important
|
71
|
-
|
72
|
-
.hexo-douban-title
|
73
|
-
transition all .2s ease 0s
|
74
|
-
white-space nowrap
|
75
|
-
overflow hidden
|
76
|
-
text-overflow ellipsis
|
77
|
-
width 100%
|
78
|
-
|
79
|
-
a
|
80
|
-
border-bottom 0
|
81
|
-
|
82
|
-
&:hover
|
83
|
-
background none
|
84
|
-
color var(--efu-main)
|
85
|
-
|
86
|
-
.hexo-douban-pagination
|
87
|
-
margin-top 1.25rem
|
88
|
-
animation slide-in 0.6s 0.3s backwards
|
89
|
-
|
90
|
-
.hexo-douban-button
|
91
|
-
background var(--efu-card-bg)
|
92
|
-
height 2rem
|
93
|
-
line-height calc(2rem - 2px)
|
94
|
-
border-radius 8px !important
|
95
|
-
margin 0 0.3rem
|
96
|
-
padding 6px 12px
|
97
|
-
box-shadow var(--efu-shadow-border)
|
98
|
-
border var(--style-border)
|
99
|
-
transition 0.3s
|
100
|
-
display inline-flex
|
101
|
-
align-items center
|
102
|
-
|
103
|
-
&:hover
|
104
|
-
background var(--efu-main)
|
105
|
-
|
106
|
-
.hexo-douban-tabs
|
107
|
-
white-space nowrap
|
108
|
-
overflow hidden
|
109
|
-
display flex
|
110
|
-
padding 0.4rem 1rem 0.4rem 1rem
|
111
|
-
background var(--efu-card-bg)
|
112
|
-
border-radius 12px
|
113
|
-
border var(--style-border)
|
114
|
-
animation slide-in 0.6s 0.3s backwards
|
115
|
-
|
116
|
-
&:hover
|
117
|
-
border-color var(--efu-main)
|
118
|
-
|
119
|
-
a
|
120
|
-
padding 0.1rem 0.5rem
|
121
|
-
margin-right 6px
|
122
|
-
font-weight 700
|
123
|
-
border-radius 8px !important
|
124
|
-
border-bottom 0
|
125
|
-
|
126
|
-
.hexo-douban-tab-active
|
127
|
-
background var(--efu-main)
|