mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-11 14:37:31 +08:00
18 lines
513 B
JavaScript
18 lines
513 B
JavaScript
const bgs = [
|
|
"bg1.png",
|
|
"bg3.png",
|
|
"bg4.png",
|
|
"bg5.png",
|
|
"bg6.png",
|
|
"bg7.png",
|
|
"bg9.png",
|
|
]
|
|
// 随机选择背景图片
|
|
document.body.style.backgroundImage = `url(./img/${bgs[Math.floor(Math.random() * bgs.length)]})`;
|
|
// body后插入info-box id=description
|
|
let descriptionDiv = document.createElement("div");
|
|
descriptionDiv.className = 'info-box'
|
|
descriptionDiv.id = 'author-description'
|
|
descriptionDiv.innerText = 'Designed by SnowyKami'
|
|
document.body.appendChild(descriptionDiv);
|