Sunil Mohan Adapa c45bdf56dd
ui: js: Load all JS files in deferred mode to speed up page load
- This improves page rendering time. If JS files are not loaded in deferred or
async mode, they will halt the page rendering until JS files are loaded from
network.

- 'defer' mode guarantees that the load order is same as the order in which JS
files appeared in the HTML page.

Tests:

- Run at least one function of each affected JS file and ensure that is works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-01-07 12:08:51 +02:00

45 lines
1.0 KiB
HTML

{% extends "app.html" %}
{% comment %}
# SPDX-License-Identifier: AGPL-3.0-or-later
{% endcomment %}
{% load bootstrap %}
{% load i18n %}
{% load static %}
{% block page_js %}
<script type="text/javascript" src="{% static 'tor/tor.js' %}"
defer></script>
{% endblock %}
{% block status %}
{{ block.super }}
{% if status.hs_enabled %}
<div class="table-responsive">
<table class="table tor-hs">
<thead>
<tr>
<th>{% trans "Onion Service" %}</th>
<th>{% trans "Status" %}</th>
<th>{% trans "Ports" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tor-hs-hostname">{{ status.hs_hostname }}</td>
<td class="tor-hs-status">{{ status.hs_status }}</td>
<td class="tor-hs-services">
{{ status.hs_services|join:', ' }}
</td>
</tr>
</tbody>
</table>
</div>
{% endif %}
{% endblock %}
{% block internal_zone %}
{{ block.super }}
{% endblock %}