UNPKG
hexo-theme-reimu
Version:
latest (1.11.2)
1.11.2
1.11.1
1.11.0
1.10.4
1.10.3
1.10.2
1.10.1
1.10.0
1.9.2
1.9.1
1.9.0
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8.0
1.7.0
1.6.0
1.5.2
1.5.1
1.5.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.1.1
1.1.0
1.0.0
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.2
0.1.1
0.1.0
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
A Hakurei Reimu style Hexo theme
github.com/D-Sketon/hexo-theme-reimu
D-Sketon/hexo-theme-reimu
hexo-theme-reimu
/
scripts
/
helper
/
randomCover.js
8 lines
(7 loc)
•
195 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
hexo.
extend
.
helper
.
register
(
"randomCover"
,
() =>
{
let
covers = hexo.
locals
.
get
(
"covers"
);
if
(!covers) {
return
null
; }
return
covers[
Math
.
floor
(
Math
.
random
() * covers.
length
)]; });