Code change:
<ins> $(document).ready(function() { function setCookie(name, value, days) { let expires = ""; let date = new Date(); // Create a new Date object let dateToSecond = 24 * 60 * 60 * 1000; if (days) { date.setTime(date.getTime() + days * dateToSecond); // Modify the existing Date object expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + value + expires + "; path=/"; } function getCookie(name) { let matches = document.cookie.match(new RegExp( "(?:^|; )" + name.replace(/([.$?*|{}()[]/+^])/g, '$1') + "=([^;]*)" )); return matches ? "true" : undefined; } /* Check the presence of a cookie */ let announcement = document.querySelector("#announcement"); let token = `announcement_ack_${announcement.getAttribute('data-announcement-name').replace(/s/g, '_')}`; // Generate the unique token for announcement let acknowledged = getCookie(token); if (acknowledged === "true") { announcement.remove(); // Remove the announcement if the cookie is set } else { announcement.classList.add('display-announcement') // Display the announcement if the cookie is not set } /* Driver code to set the cookie */ let button = document.querySelector('#banner-dismiss'); button.removeAttribute('style'); button.addEventListener('click', function() { setCookie(token, "true", button.getAttribute('data-ttl')); // Set a cookie with time to live parameter announcement.remove(); }); }); </ins>

Related discussion:
text: This is a Feature Request The red banner introduced with is too intrusive. Most Kubernetes users don't actually care about this deadline, and there is no way to dismiss it. What would you like to be A simple "dismiss" button that sets a cookie to hide the banner in any future visit, like other websites do. Why is this needed I'd argue that most users of the website just want to read the documentation, they aren't going to submit images to that registry, so the warning isn't useful. Comments This could be reused for future banners.
This issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the label. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/retitle Add way to dismiss banners in the K8s website We would implement this for all banners, not just red ones.
/area web-development
oh boy! are you in for a ride!!
xref: also, here's how i deal with papercuts on the web -
Which all banners are you referring to? I'd be willing to take this up.
There's a banner displayed now, it looks like this: ! Imagine if you could click to acknowledge that you'd read it and didn't want to see it again for a fortnight. (separately: does feel relevant - ruled out taking action as they don't plan to push a container image there, which I think reveals a misunderstanding. I think it's worth repeating banners every couple of weeks in case it helps a message to land better).
Which ...To clarify for anyone reading: This banner applies to pulling / downloading container images from the Kubernetes project, this banner is aimed at users, not Kubernetes developers. Nobody can push directly to either of these hosts and the change isn't related to pushing / submitting images.
Thanks and for the explanation! I'll take this up and try to resolve this. /assign
are you working on this issue? I would like to help if you want. Do let me know.
Yes, I'm working on this still, mostly it's completed already, but thanks for the offer!