1/* 2 3 _ 4 ____ ____ ____ __ ______ (_)____ 5 / __ \/ __ \/ __ \/ / / / __ \ / / ___/ 6 / /_/ / /_/ / /_/ / /_/ / /_/ / / (__ ) 7 / .___/\____/ .___/\__,_/ .___(_)_/ /____/ 8/_/ /_/ /_/ /___/ 9 10 11 Version: 2.0.2 12 Author: digiPublica 13 Website: https://www.digipublica.de 14 Desc: digiPublica Basic JS for PopUp 15 16*/ 17 18/* ----------------------------------------------- 19INITIALIZE 20----------------------------------------------- */ 21 22jQuery(document).ready(function(){ 23 jQuery(".popup").each(function() { 24 25 var popup = jQuery(this); 26 var cookie = jQuery(this).attr("data-cookie"); 27 28 //DETECT IF IS IN BACKEND 29 if (jQuery(popup).is('[data-backend]')) { 30 var alwaysHidden = true; 31 } else { 32 var alwaysHidden = false; 33 } 34 35 //IF HIDDEN DO NOTHING 36 if (alwaysHidden == true) { 37 38 //IF COOKIE IS SET AND COOKIECONSENT EXISTS 39 } else if (cookie == "enabled" && jQuery(".cookieconsent").length) { 40 41 jQuery(window).on('load', function() { 42 43 function getCookie(cname) { 44 var name = cname + "="; 45 var decodedCookie = decodeURIComponent(document.cookie); 46 var ca = decodedCookie.split(';'); 47 for(var i = 0; i <ca.length; i++) { 48 var c = ca[i]; 49 while (c.charAt(0) == ' ') { 50 c = c.substring(1); 51 } 52 if (c.indexOf(name) == 0) { 53 return c.substring(name.length, c.length); 54 } 55 } 56 return ""; 57 } 58 59 function checkCookies() { 60 digipublicaCookieConsent = getCookie('Cookie_Consent'); 61 digipublicaPopUp = getCookie('Pop Up'); 62 if(!digipublicaPopUp && digipublicaCookieConsent) { 63 setTimeout(function(){ 64 jQuery(".popup-content").addClass("opened"); 65 jQuery(".popup-shade").addClass("cover"); 66 jQuery(".popup a").attr("tabindex", "1"); 67 }, 500); 68 } 69 } 70 71 jQuery(".popup-close").click(function() { 72 73 document.cookie = "Pop Up=saved; path=/; expires=" + 0; 74 75 jQuery(".popup-content").removeClass("opened"); 76 jQuery(".popup-shade").removeClass("cover"); 77 jQuery(".popup a").attr("tabindex", "-1"); 78 checkCookies(); 79 80 }); 81 82 checkCookies(); 83 84 }); 85 86 //IF COOKIE IS SET 87 } else if (cookie == "enabled") { 88 89 jQuery(window).on('load', function() { 90 91 function getCookie(cname) { 92 var name = cname + "="; 93 var decodedCookie = decodeURIComponent(document.cookie); 94 var ca = decodedCookie.split(';'); 95 for(var i = 0; i <ca.length; i++) { 96 var c = ca[i]; 97 while (c.charAt(0) == ' ') { 98 c = c.substring(1); 99 } 100 if (c.indexOf(name) == 0) { 101 return c.substring(name.length, c.length); 102 } 103 } 104 return ""; 105 } 106 107 function checkCookies() { 108 digipublicaPopUp = getCookie('Pop Up'); 109 if(!digipublicaPopUp) { 110 setTimeout(function(){ 111 jQuery(".popup-content").addClass("opened"); 112 jQuery(".popup-shade").addClass("cover"); 113 jQuery(".popup a").attr("tabindex", "1"); 114 }, 500); 115 } 116 } 117 118 jQuery(".popup-close").click(function() { 119 120 document.cookie = "Pop Up=saved; path=/; expires=" + 0; 121 122 jQuery(".popup-content").removeClass("opened"); 123 jQuery(".popup-shade").removeClass("cover"); 124 jQuery(".popup a").attr("tabindex", "-1"); 125 checkCookies(); 126 127 }); 128 129 checkCookies(); 130 131 }); 132 133 //IF COOKIE IS NOT SET 134 } else if (cookie == "disabled") { 135 136 jQuery(window).on('load', function() { 137 138 setTimeout(function(){ 139 jQuery(".popup-content").addClass("opened"); 140 jQuery(".popup-shade").addClass("cover"); 141 jQuery(".popup a").attr("tabindex", "1"); 142 }, 500); 143 144 jQuery(".popup-close").click(function() { 145 jQuery(".popup-content").removeClass("opened");
146 jQuery(".popup-shade").removeClass("cover"); 147 jQuery(".popup a").attr("tabindex", "-1"); 148 }); 149 150 }); 151 152 } 153 154 }); 155});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.