Skip to content

Commit

Permalink
chore(ci): Fix cookie banner style issues (#18745)
Browse files Browse the repository at this point in the history
* chore(ci): Fix cookie banner style issues

Signed-off-by: Jesse Szwedko <[email protected]>

* spelling

Signed-off-by: Jesse Szwedko <[email protected]>

---------

Signed-off-by: Jesse Szwedko <[email protected]>
  • Loading branch information
jszwedko committed Oct 27, 2023
1 parent c499427 commit 792a1b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/actions/spelling/excludes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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$
Expand Down Expand Up @@ -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$
Expand Down Expand Up @@ -104,4 +107,3 @@
^\Qwebsite/layouts/shortcodes/config/unit-tests.html\E$
^lib/codecs/tests/data/native_encoding/
ignore$

5 changes: 4 additions & 1 deletion .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ posttrunc
prebuild
precpu
preds
prefs
preinst
preread
prereqs
Expand Down Expand Up @@ -1074,6 +1075,7 @@ Takeaways
targetgroup
tarpit
tcmalloc
teconsent
telecom
templatable
templateable
Expand Down Expand Up @@ -1133,6 +1135,8 @@ tripwires
Trivago
trivy
Troutwine
trustarc
truste
TRUSTSTORE
TSDB
Tsvg
Expand Down Expand Up @@ -1224,7 +1228,6 @@ wktpointer
wmem
woooooow
woothee
wor
wordlist
workdir
workstreams
Expand Down
6 changes: 3 additions & 3 deletions website/assets/js/cookie-banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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')) {
Expand All @@ -38,4 +38,4 @@ window.addEventListener('load', function () {
return (cookieLink && document.getElementById('teconsent').innerHTML.length > 0) ? cookieLink.replaceWith(prefsElement) : false;
}, 200);
}
});
});

0 comments on commit 792a1b5

Please sign in to comment.