Skip to content

Instantly share code, notes, and snippets.

@tranchausky
Created March 18, 2025 04:02
Show Gist options
  • Save tranchausky/51765888e40eb4aebf0427588c0e151d to your computer and use it in GitHub Desktop.
Save tranchausky/51765888e40eb4aebf0427588c0e151d to your computer and use it in GitHub Desktop.
cookie basic
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cookie Consent</title>
<script src="./cookie.js"></script>
<link rel="stylesheet" href="./cookie.css">
</head>
<body>
<script>
window.addEventListener("load", function() {
window.cookieconsent.initialise({
palette: {
popup: { background: "#000" },
button: { background: "#f1d600" }
},
theme: "classic",
content: {
message: "This website uses cookies to ensure you get the best experience.",
dismiss: "Got it!",
link: "Learn more",
href: "https://www.yourwebsite.com/cookie-policy"
}
});
});
</script>
</body>
</html>
@tranchausky
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment