From 3b2b6a2211145d175021090d8e361e796e938cb3 Mon Sep 17 00:00:00 2001 From: Rujul Nayak <55329600+nayakrujul@users.noreply.github.com> Date: Sat, 2 Nov 2024 16:10:30 +0000 Subject: [PATCH] Remove banner after click --- scripts/cookies.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cookies.js b/scripts/cookies.js index a66749d..9c5d531 100644 --- a/scripts/cookies.js +++ b/scripts/cookies.js @@ -58,7 +58,7 @@ if (!get_cookies()["cookiesAllowed"]) { if (!get_cookies()[BANNER_COOKIE]) { document.body.appendChild(main_banner); document.getElementById("dismiss-banner").addEventListener("click", remove_main_banner); - document.getElementById("logo-button").addEventListener("click", () => window.open("/new-logo/")); + document.getElementById("logo-button").addEventListener("click", () => remove_main_banner() && window.open("/new-logo/")); } else { document.cookie = BANNER_COOKIE + "=1;domain=vtp6.rujulnayak.com;path=/;max-age=31536000"; }