mirror of
https://github.com/audacity/audacity.github.io.git
synced 2026-06-14 07:03:26 -05:00
Merge pull request #11 from cjdenio/cookie-banner-scroll-to-top
Fix issue where accepting/rejecting cookies resets your scroll position
This commit is contained in:
@@ -28,6 +28,8 @@ window.onload = () => {
|
||||
const rejectBtn = document.getElementById("reject");
|
||||
|
||||
const acceptCookie = (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
saveAcceptToStorage(storageType);
|
||||
consentPopup.classList.add("hide");
|
||||
if (typeof _paq !== "undefined") {
|
||||
@@ -36,6 +38,8 @@ window.onload = () => {
|
||||
};
|
||||
|
||||
const rejectCookie = (event) => {
|
||||
event.preventDefault();
|
||||
|
||||
saveRejectToStorage(storageType);
|
||||
consentPopup.classList.add("hide");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user