We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
Change the code of loading parts of "autoload.js" to this:
//判断移动端用户方法 function isMobile() { var userAgent = navigator.userAgent || window.opera; if (/android/i.test(userAgent) || /iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) { return true; } } // 加载 waifu.css live2d.min.js waifu-tips.js if (isMobile()) { //移动端用户 Promise.all([ loadExternalResource(live2d_path + "waifu-mobie.css", "css"), loadExternalResource(live2d_path + "live2d.min.js", "js"), loadExternalResource(live2d_path + "waifu-tips.js", "js") ]).then(() => { // 配置选项的具体用法见 README.md initWidget({ waifuPath: live2d_path + "waifu-tips.json", //apiPath: "https://live2d.fghrsh.net/api/", cdnPath: "**Your javascript path**", tools: ["hitokoto", "asteroids", "switch-model", "switch-texture", "photo", "info", "quit"] }); }); } else { //pc端用户 Promise.all([ loadExternalResource(live2d_path + "waifu.css", "css"), loadExternalResource(live2d_path + "live2d.min.js", "js"), loadExternalResource(live2d_path + "waifu-tips.js", "js") ]).then(() => { initWidget({ waifuPath: live2d_path + "waifu-tips.json", //apiPath: "https://live2d.fghrsh.net/api/", cdnPath: "**Your javascript path**", tools: ["hitokoto", "asteroids", "switch-model", "switch-texture", "photo", "info", "quit"] }); }); }
Then,copied the waifu.css and edit the part of it into this:
#waifu-toggle { background-color: #fa0; border-radius: 5px; bottom: 10px; color: #fff; cursor: pointer; font-size: 12px; left: -10px; margin-left: -100px; padding: 5px 2px 5px 5px; position: fixed; transition: margin-left 1s; width: 30px; writing-mode: vertical-rl; }
And then renamd it into "waifu-mobie.css" for phone visitors to load it and show the live widget.
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: