Update waifu-tips.js

This commit is contained in:
PFiS 2021-02-15 10:41:09 +08:00 committed by GitHub
parent 04f3a44224
commit 8576718258
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,15 +103,27 @@ function loadWidget(config) {
localStorage.setItem("Live2DPlace", "right"); localStorage.setItem("Live2DPlace", "right");
showMessage("耶,可以去右边了呢~。", 2000, 11); showMessage("耶,可以去右边了呢~。", 2000, 11);
document.getElementById("waifu").style.bottom = "-500px"; document.getElementById("waifu").style.bottom = "-500px";
setTimeout('document.getElementById("live2d_css").setAttribute("href",live2d_path + "waifu_right.css")',3000); document.getElementById("waifu-toggle").style.display = "none";
setTimeout('document.getElementById("waifu").style.bottom = "0px"',3000); setTimeout(() => {
document.getElementById("live2d_css").href = live2d_path + "waifu_right.css";
document.getElementById("waifu").style.bottom = "0px";
document.getElementById("live2d-go-right").style.display = "none";
document.getElementById("live2d-go-left").style.display = "block";
}, 3000);
setTimeout('document.getElementById("waifu-toggle").style.display = "inline"',6000);
}); });
document.querySelector("#waifu-tool .fa-chevron-left").addEventListener("click", () => { // 切换看板娘位置(左 <= 右) document.querySelector("#waifu-tool .fa-chevron-left").addEventListener("click", () => { // 切换看板娘位置(左 <= 右)
localStorage.setItem("Live2DPlace", "left"); localStorage.setItem("Live2DPlace", "left");
showMessage("耶,可以去左边了呢~。", 2000, 11); showMessage("耶,可以去左边了呢~。", 2000, 11);
document.getElementById("waifu").style.bottom = "-500px"; document.getElementById("waifu").style.bottom = "-500px";
setTimeout('document.getElementById("live2d_css").setAttribute("href",live2d_path + "waifu_left.css")',3000); document.getElementById("waifu-toggle").style.display = "none";
setTimeout('document.getElementById("waifu").style.bottom = "0px"',3000); setTimeout(() => {
document.getElementById("live2d_css").href = live2d_path + "waifu_left.css";
document.getElementById("waifu").style.bottom = "0px";
document.getElementById("live2d-go-left").style.display = "none";
document.getElementById("live2d-go-right").style.display = "block";
}, 3000);
setTimeout('document.getElementById("waifu-toggle").style.display = "inline"',6000);
}); });
const devtools = () => { }; const devtools = () => { };
console.log("%c", devtools); console.log("%c", devtools);