models/ui.py: make the path of script.js absolute

This commit is contained in:
Zhang Hua 2023-03-11 09:18:08 +08:00
parent 1fa1ab5249
commit 8106117a47
No known key found for this signature in database
GPG Key ID: 69528D6DCD2BE030
1 changed files with 2 additions and 1 deletions

View File

@ -1745,7 +1745,8 @@ def create_ui():
def reload_javascript():
head = f'<script type="text/javascript" src="file={os.path.abspath("script.js")}?{os.path.getmtime("script.js")}"></script>\n'
script_js = os.path.join(script_path, "script.js")
head = f'<script type="text/javascript" src="file={os.path.abspath(script_js)}?{os.path.getmtime(script_js)}"></script>\n'
inline = f"{localization.localization_js(shared.opts.localization)};"
if cmd_opts.theme is not None: