-
Notifications
You must be signed in to change notification settings - Fork 3
/
ihavecookies.min.js
1 lines (1 loc) · 1.55 KB
/
ihavecookies.min.js
1
!function(e){e.fn.ihavecookies=function(i){var n=e(this),s=e.extend({title:"Cookies & Privacy",message:"Cookies enable you to use shopping carts and to personalize your experience on our sites, tell us which parts of our websites people have visited, help us measure the effectiveness of ads and web searches, and give us insights into user behavior so we can improve our communications and products.",link:"/privacy-policy",delay:2e3,expires:30,onAccept:function(){},uncheckBoxes:!1},i),c=t("cookieControl");if(c)o(s.expires);else{var r='<div id="gdpr-cookie-message"><h4>'+s.title+"</h4><p>"+s.message+'</p><p><a href="'+s.link+'" target="_blank">Περισσότερες Πληροφορίες</a> <button id="gdpr-cookie-accept" type="button">Συμφωνώ</button></p></div>';$("#log").prop('disabled',true);setTimeout(function(){e(n).append(r),e("#gdpr-cookie-message").hide().fadeIn("slow")},s.delay),e("body").on("click","#gdpr-cookie-accept",function(){o(s.expires),s.onAccept.call(this)})}s.uncheckBoxes===!0&&e('input[type="checkbox"].ihavecookies').prop("checked",!1)};var o=function(o){i("cookieControl",!0,o),e("#gdpr-cookie-message").fadeOut("fast",function(){e(this).remove()})},i=function(e,o,i){var n=new Date;n.setTime(n.getTime()+24*i*60*60*1e3);var s="expires="+n.toUTCString();return document.cookie=e+"="+o+";"+s+";path=/",t(e)},t=function(e){for(var o=e+"=",i=decodeURIComponent(document.cookie),t=i.split(";"),n=0;n<t.length;n++){for(var s=t[n];" "==s.charAt(0);)s=s.substring(1);if(0===s.indexOf(o))return s.substring(o.length,s.length)}return!1}}(jQuery);