From f17f6f1a3716f980f802acc29da6e32f1719d1e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Wed, 30 Mar 2022 13:48:10 +0200 Subject: [PATCH] new: toggle select in subsequent URLs capture --- tools/generate_sri.py | 2 ++ website/web/sri.txt | 2 +- website/web/static/generic.js | 7 +++++++ website/web/templates/hostname_popup.html | 3 --- website/web/templates/main.html | 3 +++ website/web/templates/urls_rendered.html | 9 ++++++++- 6 files changed, 21 insertions(+), 5 deletions(-) diff --git a/tools/generate_sri.py b/tools/generate_sri.py index 0179eda8..0384298f 100755 --- a/tools/generate_sri.py +++ b/tools/generate_sri.py @@ -15,6 +15,8 @@ if __name__ == '__main__': to_save: Dict = {'static': {}} for resource in (dest_dir / 'static').glob('*'): + if resource.name[0] == '.': + continue with resource.open('rb') as f: to_save['static'][resource.name] = base64.b64encode(hashlib.sha512(f.read()).digest()).decode('utf-8') diff --git a/website/web/sri.txt b/website/web/sri.txt index 6ae9310f..60954b74 100644 --- a/website/web/sri.txt +++ b/website/web/sri.txt @@ -18,7 +18,7 @@ "favicon.ico": "KOmrfwRbOQqhhwSeBkNpMRAxSVMmmLg+2kRMg9iSv7OWjE9spJc7x4MKB4AE/hi0knaV7UBVctAU6XZ7AC72ZA==", "font.png": "RwoQkj9dT9SLUL2F7cAA16Nat9t2hDb58eQlHF9ThUar829p0INUXG+5XuDaFOC8SsmCZK5vw2f+YAQ6mLC1Qw==", "generic.css": "6pYUMp7DzXI/O531PJ2PIB0/ce0TdIWEOEC4RfpcbMK2SRgKkZfGn12aixsTJEzAkF8Ao0/Bz405v3Bl0f7RUQ==", - "generic.js": "c/p+6Dk2kcwd9T9kf/IfoCX/ZU+VbtlUGYBo3qNSzwoUYC1soWwdIwM5rFxwxz9a1tORc/Wu0EFCPRw4ZwbqkQ==", + "generic.js": "UmFl4fHmB/UjMdUuYdFy9BfzQlJTyeImNHCFyBO4SdLxBCwCGxkF3NQvel1PKqW8JTnoPlPpq/n9d+vCfPeegA==", "html.png": "T7pZrb8MMDsA/JV/51hu+TOglTqlxySuEVY0rpDjTuAEyhzk2v+W4kYrj7vX+Tp3n2d2lvVD08PwhCG62Yfbzg==", "ifr.png": "rI5YJypmz1QcULRf9UaOYSqV4tPUSxUdLAycoYzCwywt4Pw4eWzBg9SUr769VyIimoiIyJR+aNuoIA4p5WO2fQ==", "img.png": "bknBlmIfSb9qv9/lSaJ2idn2a8bDyvJ2pATj4oOpehRlCdXlWYOyb2jN3wV1QGHFoqyxNqOv5MfCpI0tbqkicg==", diff --git a/website/web/static/generic.js b/website/web/static/generic.js index 41af08b2..34ba628d 100644 --- a/website/web/static/generic.js +++ b/website/web/static/generic.js @@ -17,3 +17,10 @@ let copyToClipboard = (text, el) => { document.body.removeChild(copyTextArea); el.attr('data-original-title', elOriginalText); } + +function checkAllBoxes(name) { + let checkboxs = document.getElementsByName(name); + for(let i = 0; i < checkboxs.length ; i++) { + checkboxs[i].checked = !checkboxs[i].checked; + } +} diff --git a/website/web/templates/hostname_popup.html b/website/web/templates/hostname_popup.html index 00f1ce0a..3ecbaa47 100644 --- a/website/web/templates/hostname_popup.html +++ b/website/web/templates/hostname_popup.html @@ -13,9 +13,6 @@ {% block scripts %} {{ super() }} - + {% endblock %} diff --git a/website/web/templates/urls_rendered.html b/website/web/templates/urls_rendered.html index 2602fbf2..39efed71 100644 --- a/website/web/templates/urls_rendered.html +++ b/website/web/templates/urls_rendered.html @@ -1,8 +1,15 @@

Select below the URLs you want to capture.

+ + +
{% for url in urls %} -
+