| try { |
| $("<link>").attr({href: "file=docs/waifu_plugin/waifu.css", rel: "stylesheet", type: "text/css"}).appendTo('head'); |
| $('body').append('<div class="waifu"><div class="waifu-tips"></div><canvas id="live2d" class="live2d"></canvas><div class="waifu-tool"><span class="fui-home"></span> <span class="fui-chat"></span> <span class="fui-eye"></span> <span class="fui-user"></span> <span class="fui-photo"></span> <span class="fui-info-circle"></span> <span class="fui-cross"></span></div></div>'); |
| $.ajax({url: "file=docs/waifu_plugin/waifu-tips.js", dataType:"script", cache: true, success: function() { |
| $.ajax({url: "file=docs/waifu_plugin/live2d.js", dataType:"script", cache: true, success: function() { |
| |
| live2d_settings['hitokotoAPI'] = "hitokoto.cn"; |
| live2d_settings['modelId'] = 5; |
| live2d_settings['modelTexturesId'] = 1; |
| live2d_settings['modelStorage'] = false; |
| live2d_settings['waifuSize'] = '210x187'; |
| live2d_settings['waifuTipsSize'] = '187x52'; |
| live2d_settings['canSwitchModel'] = true; |
| live2d_settings['canSwitchTextures'] = true; |
| live2d_settings['canSwitchHitokoto'] = false; |
| live2d_settings['canTakeScreenshot'] = false; |
| live2d_settings['canTurnToHomePage'] = false; |
| live2d_settings['canTurnToAboutPage'] = false; |
| |
| initModel("file=docs/waifu_plugin/waifu-tips.json"); |
| }}); |
| }}); |
| } catch(err) { console.log("[Error] JQuery is not defined.") } |
|
|