/* * Copyright (c) 2024 Flerosoft (https://flerosoft.com) * Software Name: Cookie Notice Pro - jQuery Plugin * Product Page : https://cookienoticepro.flerosoft.com * Documentation: https://cookienoticepro.flerosoft.com/docs * Description: Cookie Notice Pro, a lightweight jQuery plugin, helps you to comply with GDPR. Make your own cookie information popup in minutes. * Changelog: https://cookienoticepro.flerosoft.com/docs/getting-started#item-1-4 */ (function ($) { 'use strict' const settingsIcon = ''; const cookieIcon = ''; const closeIcon = ''; /* *-------------------------------------------------------------------------- * CONFIG OR SETTINGS - Customize the popup banner START *-------------------------------------------------------------------------- */ const config = { themeSettings: { primaryColor: "#000", // Primary Color of Popup Banner darkColor: "#3b3e4a", // Dark Theme Color lightColor: "#ffffff", // Light Theme Color themeMode: "light", // Theme Mode (light|dark) }, enableGoogleConsentMode: true, // Add support for Google consent mode v2 (https://cookiebannergenerator.com/implementing-google-consent-mode-v2-with-cookie-notice-pro-a-step-by-step-guide/) enableMinimize: true, // Enable minimized floating cookie icon to adjust preferences showCookieIcon: true, // Hide or show the cookie icon showSettingsBtn: true, // Hide or show the preference settings(true|false) showCloseIcon: false, // Hide or show the popup close icon(true|false) showDeclineBtn: true, // Hide or show the cookie decline button(true|false) fullWidth: false, // Full width popup works only when "displayPosition" is set to top/bottom allCheckboxesChecked: true, // The setting checkboxes should be checked by default initially or not(true|false) displayPosition: "bottom", // Where popup should appear(top|right|bottom|left) settingsBtnLabel: "Anpassen", // Text of settings button delay: 1, // After how much time should popup appear(2000 is equal to 2 seconds) expires: 365, // Expiry date of cookie(365 is equal to 365 days) title: "Wir schätzen die Privatsphäre der Benutzer", // Title of popup bannner description: "Wir verwenden Cookies, um die Qualität des Browsing-Erlebnisses zu verbessern, Werbung oder Inhalte an individuelle Benutzerbedürfnisse anzupassen und den Website-Verkehr zu analysieren. Durch Klicken auf die Schaltfläche 'Alle akzeptieren' erklären Sie sich damit einverstanden, dass wir Cookies verwenden.", // Message acceptBtnLabel: "Annehmen", // Accept cookie button text declineInfoBtnLabel: "Ablehnen", // Decline cookie button text moreInfoBtnLink: "/privatpolitik", // Learn more link(default: privacy policy page) moreInfoBtnLabel: "Privatpolitik", // More info link text cookieTypesTitle: "Wählen Sie die zu akzeptierenden Cookies aus", // Title of cookie preference options necessaryCookieTypeLabel: "Erforderlich", // Label text of Necessary cookie item floatingIconTooltip: "Anpassen", // Tooltip of floating cookie icon (Minimized) necessaryCookieTypeDesc: "These cookies are necessary for the website to function and cannot be switched off in our systems.", // Hover text of necessary cookies onConsentAccept: ()=> { // It will inject scripts in head if cookie preferences menu(showSettingsBtn) is enabled console.log("Consent accepted!") }, onConsentReject: ()=> { // This code will run on cookie reject/decline console.log("Consent Rejected!"); }, cookieTypes: [ // Cookie types, value and description (Cookie Preferences Selection) { type: "Funktional", value: "preferences", // WARNING: DO NOT EDIT THIS VALUE description: "Erforderliche Cookies sind für die grundlegenden Funktionen der Website von entscheidender Bedeutung, und die Website wird ohne sie nicht wie beabsichtigt funktionieren. Diese Cookies speichern keine Daten, die eine Identifizierung einer Person ermöglichen.", }, { type: "Werbung", value: "marketing", // WARNING: DO NOT EDIT THIS VALUE description: "Werbungs-Cookies dienen dazu, den Nutzern personalisierte Anzeigen basierend auf den zuvor besuchten Websites bereitzustellen und die Wirksamkeit von Werbekampagnen zu analysieren.", }, { type: "Analytik", value: "analytics", // WARNING: DO NOT EDIT THIS VALUE description: "Analyse-Cookies dienen dazu zu verstehen, wie Benutzer mit der Website interagieren. Diese Cookies helfen dabei, Informationen über Metriken wie die Anzahl der Besucher, die Absprungrate, die Verkehrsquelle usw. bereitzustellen.", }, ], }; /* *-------------------------------------------------------------------------- * CONFIG OR SETTINGS - Customize the popup banner END *-------------------------------------------------------------------------- */ const COOKIE_CONSENT = "cnp_consent"; // WARNING: DO NOT EDIT THIS VALUE const COOKIE_CONSENT_PREFS = "cnp_prefs"; // WARNING: DO NOT EDIT THIS VALUE const GOOGLE_CONSENT_MODE_AD_PREFS = "cnp_gconsent_ad_prefs" // WARNING: DO NOT EDIT THIS VALUE const GOOGLE_CONSENT_MODE_ANALYTICS_STORAGE = "cnp_gconsent_analytics_storage" // WARNING: DO NOT EDIT THIS VALUE $.fn.cookieNoticePro = (event) => { changeRootVariables(); let cookieConsentExists = cookieExists(COOKIE_CONSENT); let cookiePrefsValue = accessCookie(COOKIE_CONSENT_PREFS); if ( !cookieConsentExists) { // add layer to the body below cookies to prevent click $('body').append('
'); } // If consent is not accepted if (!cookieConsentExists || event == "open") { $("#cookieNoticePro").remove(); $("#cookieMinimizeIcon").remove(); let cookieTypes='