镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 14:36:48 +00:00
live2d shutdown bug fix
这个提交包含在:
@@ -831,6 +831,10 @@ function limit_scroll_position() {
|
||||
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
function loadLive2D() {
|
||||
if (document.querySelector(".waifu") )
|
||||
{
|
||||
$('.waifu').show();
|
||||
} else {
|
||||
try {
|
||||
$("<link>").attr({ href: "file=themes/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>');
|
||||
@@ -864,6 +868,7 @@ function loadLive2D() {
|
||||
}
|
||||
});
|
||||
} catch (err) { console.log("[Error] JQuery is not defined.") }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -142,7 +142,13 @@ function initModel(waifuPath, type) {
|
||||
if (live2d_settings.waifuEdgeSide[0] == 'left') $(".waifu").css("left",live2d_settings.waifuEdgeSide[1]+'px');
|
||||
else if (live2d_settings.waifuEdgeSide[0] == 'right') $(".waifu").css("right",live2d_settings.waifuEdgeSide[1]+'px');
|
||||
|
||||
window.waifuResize = function() { $(window).width() <= Number(live2d_settings.waifuMinWidth.replace('px','')) ? $(".waifu").hide() : $(".waifu").show(); };
|
||||
window.waifuResize = function() {
|
||||
console.log('resize');
|
||||
if ($('.waifu')[0].style.display === "none" ){
|
||||
} else{
|
||||
$(window).width() <= Number(live2d_settings.waifuMinWidth.replace('px','')) ? $(".waifu").hide() : $(".waifu").show();
|
||||
}
|
||||
};
|
||||
if (live2d_settings.waifuMinWidth != 'disable') { waifuResize(); $(window).resize(function() {waifuResize()}); }
|
||||
|
||||
try {
|
||||
|
||||
在新工单中引用
屏蔽一个用户