From 792a1b541aaa1b34bef605bb9be4f0787b35afab Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Mon, 2 Oct 2023 16:52:13 -0700 Subject: [PATCH] chore(ci): Fix cookie banner style issues (#18745) * chore(ci): Fix cookie banner style issues Signed-off-by: Jesse Szwedko * spelling Signed-off-by: Jesse Szwedko --------- Signed-off-by: Jesse Szwedko --- .github/actions/spelling/excludes.txt | 6 ++++-- .github/actions/spelling/expect.txt | 5 ++++- website/assets/js/cookie-banner.js | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt index f7674ed58ce6c..ffffd7e0f95cb 100644 --- a/.github/actions/spelling/excludes.txt +++ b/.github/actions/spelling/excludes.txt @@ -2,13 +2,13 @@ (?:^|/)(?i)COPYRIGHT (?:^|/)(?i)LICEN[CS]E (?:^|/)3rdparty/ +(?:^|/)amplify\.yml$ (?:^|/)go\.sum$ (?:^|/)package(?:-lock|)\.json$ (?:^|/)Pipfile$ (?:^|/)pyproject.toml (?:^|/)requirements(?:-dev|-doc|-test|)\.txt$ (?:^|/)vendor/ -(?:^|/)amplify\.yml$ \.a$ \.ai$ \.all-contributorsrc$ @@ -77,6 +77,9 @@ ^\Qbenches/transform/route.rs\E$ ^\Qlib/codecs/tests/data/decoding/protobuf/test_protobuf.desc\E$ ^\Qlib/codecs/tests/data/decoding/protobuf/test_protobuf3.desc\E$ +^\Qlib/codecs/tests/data/protobuf/test.desc\E$ +^\Qlib/codecs/tests/data/protobuf/test_protobuf.desc\E$ +^\Qlib/codecs/tests/data/protobuf/test_protobuf3.desc\E$ ^\Qlib/dnsmsg-parser/benches/benches.rs\E$ ^\Qlib/dnsmsg-parser/src/dns_message_parser.rs\E$ ^\Qlib/lookup/tests/fixtures/lookup/quoted\E$ @@ -104,4 +107,3 @@ ^\Qwebsite/layouts/shortcodes/config/unit-tests.html\E$ ^lib/codecs/tests/data/native_encoding/ ignore$ - diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 5da73dc7b12cb..286c3a18caa1f 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -840,6 +840,7 @@ posttrunc prebuild precpu preds +prefs preinst preread prereqs @@ -1074,6 +1075,7 @@ Takeaways targetgroup tarpit tcmalloc +teconsent telecom templatable templateable @@ -1133,6 +1135,8 @@ tripwires Trivago trivy Troutwine +trustarc +truste TRUSTSTORE TSDB Tsvg @@ -1224,7 +1228,6 @@ wktpointer wmem woooooow woothee -wor wordlist workdir workstreams diff --git a/website/assets/js/cookie-banner.js b/website/assets/js/cookie-banner.js index ee3044b545802..10afcfd6df806 100644 --- a/website/assets/js/cookie-banner.js +++ b/website/assets/js/cookie-banner.js @@ -16,7 +16,7 @@ window.addEventListener('load', function () { divB.style = "position:fixed; bottom:0px; right:0px; width:100%;"; document.body.appendChild(divA); document.body.appendChild(divB); - + // update Cookie link this.setTimeout(function () { const banner = document.getElementById('consent-banner'); @@ -25,7 +25,7 @@ window.addEventListener('load', function () { prefsElement.className = cookieLink.className; if (banner) { - // listen for click and remove banner to avoid interfering with + // listen for click and remove banner to avoid interfering with document.addEventListener('click', function (event) { const targetElement = event.target; if (targetElement.matches('#truste-consent-required') || targetElement.matches('#truste-consent-button')) { @@ -38,4 +38,4 @@ window.addEventListener('load', function () { return (cookieLink && document.getElementById('teconsent').innerHTML.length > 0) ? cookieLink.replaceWith(prefsElement) : false; }, 200); } -}); \ No newline at end of file +});