mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 16:06:21 +00:00
feat: allow disabling redirect on js-only pages
This commit is contained in:
parent
2b195652a5
commit
ed06b4bcb1
@ -5,6 +5,8 @@
|
||||
#}
|
||||
<noscript>
|
||||
<style>body > section:not(#noscript) { display: none !important; }</style>
|
||||
{% if noscriptRefreshUrl !== null -%}
|
||||
<!-- Redirect after 3 seconds -->
|
||||
<meta http-equiv="refresh" content="3;url={{ noscriptRefreshUrl or 'nojs' }}">
|
||||
{%- endif %}
|
||||
</noscript>
|
||||
|
@ -5,13 +5,11 @@
|
||||
<p>
|
||||
This page requires JavaScript to function.
|
||||
</p>
|
||||
<p>
|
||||
{%- if noscriptMessage -%}
|
||||
{{ noscriptMessage | safe }}
|
||||
{%- else -%}
|
||||
If you are not automatically redirected to our No-JS uploader, <a href="nojs">click here</a>.
|
||||
{%- endif -%}
|
||||
</p>
|
||||
{% if noscriptMessage or (noscriptMessage === null) -%}
|
||||
{{ noscriptMessage | safe }}
|
||||
{%- else -%}
|
||||
<p>If you are not automatically redirected to our No-JS uploader, <a href="nojs">click here</a>.</p>
|
||||
{%- endif %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -147,7 +147,7 @@
|
||||
{% set floatingHomeHref = '..' %}
|
||||
{% include "_partial/floating-home.njk" %}
|
||||
{% if not nojs -%}
|
||||
{% set noscriptMessage = 'If you are not automatically redirected to its No-JS version, <a href="' + noJsUrl + '">click here</a>.' %}
|
||||
{% set noscriptMessage = '<p>If you are not automatically redirected to its No-JS version, <a href="' + noJsUrl + '">click here</a>.</p>' %}
|
||||
{% include "_partial/noscript.njk" %}
|
||||
{%- endif %}
|
||||
{% endblock %}
|
||||
|
@ -34,6 +34,7 @@
|
||||
<script src="../js/misc/utils.js{{ versions[1] }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% set noscriptRefreshUrl = null %}
|
||||
{% block endmeta %}
|
||||
{% include "_partial/noscript-refresh.njk" %}
|
||||
{% endblock %}
|
||||
@ -92,5 +93,6 @@
|
||||
|
||||
{% set floatingHomeHref = '..' %}
|
||||
{% include "_partial/floating-home.njk" %}
|
||||
{% set noscriptMessage = null %}
|
||||
{% include "_partial/noscript.njk" %}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user