From 2a003e8d494bdfb3132dd40dc8d7face7e52be49 Mon Sep 17 00:00:00 2001 From: OREEkE Date: Wed, 10 Apr 2024 00:10:53 +0800 Subject: [PATCH] add loadLive2D() when ADD_WAIFU = False (#1693) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ADD_WAIFU = False,浏览器会抛出错误:[Error] JQuery is not defined. 因为这时候没有jQuery库可用,却依然使用了loadLive2D()函数。现在加一个判断,如果ADD_WAIFU = False,禁用jQuery库的同时也禁用loadLive2D()函数,除非ADD_WAIFU = True --- themes/common.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/common.py b/themes/common.py index 40c1469..65ff9a3 100644 --- a/themes/common.py +++ b/themes/common.py @@ -15,4 +15,6 @@ def get_common_html_javascript_code(): "file=themes/waifu_plugin/jquery-ui.min.js", ]: js += f"""\n""" - return js \ No newline at end of file + else: + js += """\n""" + return js