forked from leftypol/leftypol
captcha_script.html: refactor captcha script inclusion in a separate template
This commit is contained in:
parent
be69385fef
commit
95d5ec6cc6
4 changed files with 6 additions and 9 deletions
3
templates/captcha_script.html
Normal file
3
templates/captcha_script.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{% if config.turnstile %}
|
||||
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit&onload=onCaptchaLoadTurnstile" async defer></script>
|
||||
{% endif %}
|
|
@ -13,9 +13,7 @@
|
|||
active_page = "ukko";
|
||||
{% endif %}
|
||||
</script>
|
||||
{% if config.turnstile %}
|
||||
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
|
||||
{% endif %}
|
||||
{% include 'captcha_script.html' %}
|
||||
|
||||
{% include 'header.html' %}
|
||||
{% set page_num %}{% for page in pages %}{% if page.selected %}{% if page.num != 1 %}{{ page.num }}{% endif %}{% endif %}{% endfor %}{% endset %}
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
, board_name = "{{ board.uri }}"
|
||||
, is_overboard = "{{ is_overboard }}";
|
||||
</script>
|
||||
{% if config.turnstile %}
|
||||
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
|
||||
{% endif %}
|
||||
{% include 'captcha_script.html' %}
|
||||
<title>{{ settings.title }} ( /{{ board.title|e }}/ )</title>
|
||||
{% include 'header.html' %}
|
||||
</head>
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
, board_name = "{{ board.uri }}"
|
||||
, thread_id = "{{ thread.id }}";
|
||||
</script>
|
||||
{% if config.turnstile %}
|
||||
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
|
||||
{% endif %}
|
||||
{% include 'captcha_script.html' %}
|
||||
|
||||
{% include 'header.html' %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue