diff --git a/l4d2web/l4d2web/templates/overlay_detail.html b/l4d2web/l4d2web/templates/overlay_detail.html index c570bbe..19962f1 100644 --- a/l4d2web/l4d2web/templates/overlay_detail.html +++ b/l4d2web/l4d2web/templates/overlay_detail.html @@ -282,5 +282,11 @@ {% endif %} -{% include '_editor_assets.html' %} +{# Only include the ~30 KB of editor assets on pages that actually mount + an editor: script-type overlays (bash editor) and files-type overlays + that the current user can edit (the files-editor modal). Workshop + overlays and read-only pages skip the include entirely. #} +{% if overlay.type == 'script' or files_can_edit %} + {% include '_editor_assets.html' %} +{% endif %} {% endblock %}