aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy')
-rw-r--r--src/hydrilla/proxy/policies/info_pages_templates/js_fallback_blocked_info.html.jinja1
-rw-r--r--src/hydrilla/proxy/policies/info_pages_templates/js_rule_blocked_info.html.jinja1
-rw-r--r--src/hydrilla/proxy/self_doc/policy_selection.html.jinja5
-rw-r--r--src/hydrilla/proxy/self_doc/script_blocking.html.jinja103
-rw-r--r--src/hydrilla/proxy/web_ui/templates/rules/index.html.jinja5
5 files changed, 113 insertions, 2 deletions
diff --git a/src/hydrilla/proxy/policies/info_pages_templates/js_fallback_blocked_info.html.jinja b/src/hydrilla/proxy/policies/info_pages_templates/js_fallback_blocked_info.html.jinja
index 3e8719a..1b4ad51 100644
--- a/src/hydrilla/proxy/policies/info_pages_templates/js_fallback_blocked_info.html.jinja
+++ b/src/hydrilla/proxy/policies/info_pages_templates/js_fallback_blocked_info.html.jinja
@@ -11,4 +11,5 @@ Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
{% block site_policy %}
{{ _('info.js_fallback_blocked') }}
+ {{ hkt_doc_link('script_blocking') }}
{% endblock %}
diff --git a/src/hydrilla/proxy/policies/info_pages_templates/js_rule_blocked_info.html.jinja b/src/hydrilla/proxy/policies/info_pages_templates/js_rule_blocked_info.html.jinja
index e84d371..3f396a8 100644
--- a/src/hydrilla/proxy/policies/info_pages_templates/js_rule_blocked_info.html.jinja
+++ b/src/hydrilla/proxy/policies/info_pages_templates/js_rule_blocked_info.html.jinja
@@ -11,4 +11,5 @@ Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
{% block site_policy %}
{{ format_html_with_rule_url(_('info.js_blocked.html.rule{url}_is_used')) }}
+ {{ hkt_doc_link('script_blocking') }}
{% endblock %}
diff --git a/src/hydrilla/proxy/self_doc/policy_selection.html.jinja b/src/hydrilla/proxy/self_doc/policy_selection.html.jinja
index 6519e42..4d9b251 100644
--- a/src/hydrilla/proxy/self_doc/policy_selection.html.jinja
+++ b/src/hydrilla/proxy/self_doc/policy_selection.html.jinja
@@ -39,7 +39,10 @@ code in a proprietary work, I am not going to enforce this in court.
{{ _('doc.policy_selection.ask_payload_case') }}
{% endcall %}
{% call list_entry() %}
- {{ _('doc.policy_selection.block_js_case') }}
+ {% set fmt = _('doc.policy_selection.block_js_case_{blocking_link}') %}
+ {% set link_text = _('doc.policy_selection.html.block_js_case.blocking_link_text') %}
+ {% set link = doc_page_link(link_text|e, 'script_blocking') %}
+ {{ fmt.format(blocking_link=link)|safe }}
{% endcall %}
{% call list_entry() %}
{{ _('doc.policy_selection.allow_js_case') }}
diff --git a/src/hydrilla/proxy/self_doc/script_blocking.html.jinja b/src/hydrilla/proxy/self_doc/script_blocking.html.jinja
new file mode 100644
index 0000000..63b647e
--- /dev/null
+++ b/src/hydrilla/proxy/self_doc/script_blocking.html.jinja
@@ -0,0 +1,103 @@
+{#
+SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0
+
+Documentation page describing how Haketilo blocks scripts.
+
+This file is part of Hydrilla&Haketilo.
+
+Copyright (C) 2022 Wojtek Kosior
+
+Dual licensed under
+* GNU General Public License v3.0 or later and
+* Creative Commons Attribution Share Alike 4.0 International.
+
+You can choose to use either of these licenses or both.
+
+
+I, Wojtek Kosior, thereby promise not to sue for violation of this
+file's licenses. Although I request that you do not make use of this
+code in a proprietary work, I am not going to enforce this in court.
+#}
+{% extends "doc_base.html.jinja" %}
+
+{% block title %}{{ _('doc.script_blocking.title') }}{% endblock %}
+
+{% block main %}
+ {{ big_heading(_('doc.script_blocking.h_big')) }}
+
+ {% call section() %}
+ {% call paragraph() %}
+ {{ _('doc.script_blocking.intro') }}
+ {% endcall %}
+
+ {% call paragraph() %}
+ {% set fmt = _('doc.script_blocking.html.see_here_for_{packages_link}') %}
+ {% set link_text = _('doc.script_blocking.see_here_for.packages_link_text') %}
+ {% set link = doc_page_link(link_text|e, 'packages') %}
+ {{ fmt.format(packages_link=link)|safe }}
+ {% endcall %}
+ {% endcall %}
+
+ {% call section() %}
+ {{ medium_heading(_('doc.script_blocking.h_medium.configuring')) }}
+
+ {% call paragraph() %}
+ {% set fmt = _('doc.script_blocking.configuring.html.rules_{rules_link}_{patterns_link}_{policy_link}') %}
+ {% set rules_link_text = _('doc.script_blocking.configuring.rules.rules_link_text') %}
+ {% set rules_link = hkt_link(rules_link_text|e, 'rules.rules') %}
+ {% set patterns_link_text = _('doc.script_blocking.configuring.rules.patterns_link_text') %}
+ {% set patterns_link = doc_page_link(patterns_link_text|e, 'url_patterns') %}
+ {% set policy_link_text = _('doc.script_blocking.configuring.rules.policy_link_text') %}
+ {% set policy_link = doc_page_link(policy_link_text|e, 'policy_selection') %}
+ {{
+ fmt.format(
+ rules_link = rules_link,
+ patterns_link = patterns_link,
+ policy_link = policy_link
+ )|safe
+ }}
+ {% endcall %}
+
+ {% call paragraph() %}
+ {{ _('doc.script_blocking.configuring.html.rules_example')|safe }}
+ {% endcall %}
+
+ {% call paragraph() %}
+ {% set fmt = _('doc.script_blocking.configuring.html.fallback_{settings_link}') %}
+ {% set link_text = _('doc.script_blocking.configuring.html.fallback.settings_link_text') %}
+ {% set link = hkt_link(link_text|e, 'home.home') %}
+ {{ fmt.format(settings_link=link)|safe }}
+ {% endcall %}
+ {% endcall %}
+
+ {% call section() %}
+ {{ medium_heading(_('doc.script_blocking.medium_h.with_other_tools')) }}
+
+ {% call paragraph() %}
+ {{ _('doc.script_blocking.with_other_tools.haketilo_independently') }}
+ {% endcall %}
+
+ {% call paragraph() %}
+ {% set fmt = _('doc.script_blocking.with_other_tools.html.breakages_{popup_link}') %}
+ {% set link_text = _('doc.script_blocking.with_other_tools.breakages.popup_link_text') %}
+ {% set link = doc_page_link(link_text|e, 'popup') %}
+ {{ fmt.format(popup_link=link)|safe }}
+ {% endcall %}
+ {% endcall %}
+
+ {% call section() %}
+ {{ medium_heading(_('doc.script_blocking.medium_h.technical')) }}
+
+ {% call paragraph() %}
+ {{ _('doc.script_blocking.technical.general') }}
+ {% endcall %}
+
+ {% call paragraph() %}
+ {{ _('doc.script_blocking.technical.means_no_reports') }}
+ {% endcall %}
+
+ {% call paragraph() %}
+ {{ _('doc.script_blocking.technical.popup_script') }}
+ {% endcall %}
+ {% endcall %}
+{% endblock main %}
diff --git a/src/hydrilla/proxy/web_ui/templates/rules/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/rules/index.html.jinja
index 57cc8ad..d5d1d07 100644
--- a/src/hydrilla/proxy/web_ui/templates/rules/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/rules/index.html.jinja
@@ -29,7 +29,10 @@ code in a proprietary work, I am not going to enforce this in court.
{% endblock %}
{% block main %}
- <h3>{{ _('web_ui.rules.heading') }}</h3>
+ <h3>
+ {{ _('web_ui.rules.heading') }}
+ {{ hkt_doc_link('script_blocking') }}
+ </h3>
<a href="{{ url_for('.add_rule') }}"
class="green-button block-with-bottom-margin">