diff options
author | fkunn1326@users.noreply.github.com <fkunn1326@users.noreply.github.com> | 2023-02-23 03:29:22 +0000 |
---|---|---|
committer | fkunn1326@users.noreply.github.com <fkunn1326@users.noreply.github.com> | 2023-02-23 03:29:22 +0000 |
commit | b90cad7f3136bbe04efeee2a00e95d0cc6ce1a4a (patch) | |
tree | 6d8da976fad6ce46dfe702f40ef4e8ac4d956b02 | |
parent | 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8 (diff) | |
download | stable-diffusion-webui-gfx803-b90cad7f3136bbe04efeee2a00e95d0cc6ce1a4a.tar.gz stable-diffusion-webui-gfx803-b90cad7f3136bbe04efeee2a00e95d0cc6ce1a4a.tar.bz2 stable-diffusion-webui-gfx803-b90cad7f3136bbe04efeee2a00e95d0cc6ce1a4a.zip |
Add .mjs support for extensions
-rw-r--r-- | modules/ui.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py index 0516c643..2509ce2d 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1754,6 +1754,9 @@ def reload_javascript(): for script in modules.scripts.list_scripts("javascript", ".js"):
head += f'<script type="text/javascript" src="file={script.path}?{os.path.getmtime(script.path)}"></script>\n'
+ for script in modules.scripts.list_scripts("javascript", ".mjs"):
+ head += f'<script type="module" src="file={script.path}?{os.path.getmtime(script.path)}"></script>\n'
+
head += f'<script type="text/javascript">{inline}</script>\n'
def template_response(*args, **kwargs):
|