Browse Source

exclude directory no_auto_execute from automaticaly execute javascript in extension

js files in directory  no_auto_execute will not be automaticaly executed like all other js files inside extension inside WEB_DIRECTORY
pull/3342/head
grzegorzewskiflyingdog 7 months ago committed by GitHub
parent
commit
3eec3a70f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      server.py

1
server.py

@ -135,6 +135,7 @@ class PromptServer():
for name, dir in nodes.EXTENSION_WEB_DIRS.items():
files = glob.glob(os.path.join(glob.escape(dir), '**/*.js'), recursive=True)
files = [file for file in files if 'no_auto_execute' not in file]
extensions.extend(list(map(lambda f: "/extensions/" + urllib.parse.quote(
name) + "/" + os.path.relpath(f, dir).replace("\\", "/"), files)))

Loading…
Cancel
Save