Commit f6204ae4 authored by Alexandre Burgoni's avatar Alexandre Burgoni
Browse files

fix(gdpr): cookie consent click button

parent b85860df
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -115,10 +115,12 @@ function consentUpdate() {
        hotjar(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=')
}

window.addEventListener('load', () => {
    const cookieButtons = document.getElementsByClassName("tibrr-cookie-consent-button");
    for (let item of cookieButtons) {
        item.addEventListener('click', () => consent(true), false);
    }
});

// We check whether the user has already something in the localStorage for it & so fetch needed plugins
consentUpdate();