Skip to content
Snippets Groups Projects
Commit f62736e6 authored by Austin Anderson's avatar Austin Anderson
Browse files

Fix cookie warning delay

parent 780b5999
No related branches found
No related tags found
No related merge requests found
// Display warning banner if use of analytics cookies hasn't been acknowledged
if (location.hostname !== "" && !Cookies.get("tf-cookies-accepted")) {
$(".tf-cookie-warning").removeClass("d-none")
}
$("#tf-accept-cookies").click(function() {
$(this).addClass("d-none")
Cookies.set("tf-cookies-accepted", true)
})
// Navbar toggle switches // Navbar toggle switches
// When the page loads or when the navbar toggles are switched, toggle the // When the page loads or when the navbar toggles are switched, toggle the
// class on the HTML <body> tag that controls those features (colorblind or // class on the HTML <body> tag that controls those features (colorblind or
...@@ -20,6 +29,7 @@ $('#tf-show-buildcop').change(function () { ...@@ -20,6 +29,7 @@ $('#tf-show-buildcop').change(function () {
$('body').toggleClass('tf-show-buildcop') $('body').toggleClass('tf-show-buildcop')
}) })
// Update the human-readable timestamp once per minute and when the page loads // Update the human-readable timestamp once per minute and when the page loads
// Uses moment.js, which is included in the top of the HTML page // Uses moment.js, which is included in the top of the HTML page
function humanizeTimestamp () { function humanizeTimestamp () {
...@@ -166,13 +176,4 @@ $(function () { ...@@ -166,13 +176,4 @@ $(function () {
revealed = $(this).attr("data-tf-reveal") revealed = $(this).attr("data-tf-reveal")
$(".badge[data-bs-target='" + revealed + "']").removeClass("tf-last-clicked").addClass("tf-revealed") $(".badge[data-bs-target='" + revealed + "']").removeClass("tf-last-clicked").addClass("tf-revealed")
}) })
// Display warning banner if use of analytics cookies hasn't been acknowledged
if (location.hostname !== "" && !Cookies.get("tf-cookies-accepted")) {
$(".tf-cookie-warning").removeClass("d-none")
}
$("#tf-accept-cookies").click(function() {
$(this).addClass("d-none")
Cookies.set("tf-cookies-accepted", true)
})
}) })
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment