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 authored Oct 2, 2023
1 parent 43428d3 commit 7a55e54
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 @@ -78,6 +78,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 @@ -105,4 +108,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 7a55e54

Please sign in to comment.