!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.GCFDCookies,o=e.GCFDCookies=t();o.noConflict=function(){return e.GCFDCookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t window_height) { var new_height = window_height-40; consent_popup.style.height = new_height+"px"; consent_popup.style["overflow-y"] = "scroll"; } else { consent_popup.style.height = "auto"; consent_popup.style["overflow-y"] = "visible"; } } function close_gdpr_button() { document.querySelector('div.gcfd_consent_popup_button_config').style.display = "none"; } function show_configure_button() { if(gcfd_button_configuration) { document.querySelector('div.gcfd_consent_popup_button_config').classList.add("gcfd_"+gcfd_consent_popup_button_config_position); document.querySelector('div.gcfd_consent_popup_button_config').style.display = "block"; } } function configure_gdpr() { var x = document.querySelector('div.gcfd_configure_panel'); if (x.style.display === "none") x.style.display = "block"; else x.style.display = "none"; check_consent_popup_height(); } function event_update_google_consent() { GCFDCookies.set('acceptedGoogleConsent', 'Yes'); if(typeof dataLayer == 'undefined') console.error("Google Consent For Dummies: Error - Google tag manager tag not found."); dataLayer.push({ "event" : "googleConsentUpdate", "googleConsentUpdate" : { ad_storage: GCFDCookies.get("ad_storage"), analytics_storage: GCFDCookies.get("analytics_storage"), functionality_storage: GCFDCookies.get("functionality_storage"), personalization_storage: GCFDCookies.get("personalization_storage"), security_storage: GCFDCookies.get("security_storage") } }); } function gcfd_setup_popup() { var popup_code = `
`; var language_code = document.documentElement.lang; if(typeof language_code == 'undefined' || typeof gcfd_languages[language_code] == "undefined") language_code = Object.keys(gcfd_languages)[0]; lang_variables = gcfd_languages[language_code]; for (var [key, value] of Object.entries(lang_variables)) { key = 'gcfd_lang_'+key; popup_code = popup_code.replace(key, value); } document.getElementsByTagName("body")[0].innerHTML += popup_code; } function gcfd_setup_styles() { var styles_code = ``; document.getElementsByTagName("head")[0].innerHTML += styles_code; }