Socket
Socket
Sign inDemoInstall

vanilla-cookieconsent

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vanilla-cookieconsent - npm Package Compare versions

Comparing version 2.7.0 to 2.7.1

34

dist/cookieconsent.js
/*
CookieConsent v2.7.0
CookieConsent v2.7.1
https://www.github.com/orestbida/cookieconsent

@@ -18,12 +18,12 @@ Author Orest Bida

"c-s-in";l.id="cs";n.id="s-ttl";R.id="s-inr";p.id="s-hdr";S.id="s-bl";q.id="s-c-bn";z.id="cs-ov";Y.id="s-c-bnc";q.className="c-bn";q.setAttribute("aria-label",b.languages[d].settings_modal.close_btn_label||"Close");G.setAttribute("role","dialog");G.setAttribute("aria-modal","true");G.setAttribute("aria-hidden","true");G.setAttribute("aria-labelledby","s-ttl");n.setAttribute("role","heading");G.style.visibility=z.style.visibility="hidden";z.style.opacity=0;Y.appendChild(q);H(h,"keydown",function(t){t=
t||window.event;27===t.keyCode&&k.hideSettings(0)},!0);H(q,"click",function(){k.hideSettings(0)});W=b.languages[f.current_lang].settings_modal.blocks;aa=b.languages[f.current_lang].settings_modal.cookie_table_headers;q=W.length;n.insertAdjacentHTML("beforeend",b.languages[f.current_lang].settings_modal.title);for(var v=0;v<q;++v){var B=W[v].title,J=W[v].description,M=W[v].toggle,fa=W[v].cookie_table,K=!0===b.remove_cookie_tables,w=J&&"truthy"||!K&&fa&&"truthy",ma=g("div"),Z=g("div");if(J){var T=g("div");
T.className="p";T.insertAdjacentHTML("beforeend",J)}var C=g("div");C.className="title";ma.className="c-bl";Z.className="desc";if(B&&"undefined"!==typeof M){var N="c-ac-"+v,ha=w?g("button"):g("div"),D=g("label"),O=g("input"),P=g("span"),ia=g("span"),Sa=g("span"),Ta=g("span");ha.className=w?"b-tl exp":"b-tl";D.className="b-tg";O.className="c-tgl";Sa.className="on-i";Ta.className="off-i";P.className="c-tg";ia.className="t-lb";w&&(ha.setAttribute("aria-expanded","false"),ha.setAttribute("aria-controls",
N));O.type="checkbox";P.setAttribute("aria-hidden","true");var Ka=M.value;O.value=Ka;ia[e]=B;ha.insertAdjacentHTML("beforeend",B);C.appendChild(ha);P.appendChild(Sa);P.appendChild(Ta);a?-1<E(r.level,Ka)?(O.checked=!0,Q.push(!0)):Q.push(!1):M.enabled?(O.checked=!0,Q.push(!0)):Q.push(!1);F.push(Ka);M.readonly?(O.disabled=!0,I(P,"c-ro"),va.push(!0)):va.push(!1);I(Z,"b-acc");I(C,"b-bn");I(ma,"b-ex");Z.id=N;Z.setAttribute("aria-hidden","true");D.appendChild(O);D.appendChild(P);D.appendChild(ia);C.appendChild(D);
w&&function(t,y,ca){H(ha,"click",function(){Ua(y,"act")?(La(y,"act"),ca.setAttribute("aria-expanded","false"),t.setAttribute("aria-hidden","true")):(I(y,"act"),ca.setAttribute("aria-expanded","true"),t.setAttribute("aria-hidden","false"))},!1)}(Z,ma,ha)}else B&&(w=g("div"),w.className="b-tl",w.setAttribute("role","heading"),w.setAttribute("aria-level","3"),w.insertAdjacentHTML("beforeend",B),C.appendChild(w));B&&ma.appendChild(C);J&&Z.appendChild(T);if(!K&&"undefined"!==typeof fa){w=document.createDocumentFragment();
for(N=0;N<aa.length;++N)D=g("th"),K=aa[N],D.setAttribute("scope","col"),K&&(C=K&&qa(K)[0],D[e]=aa[N][C],w.appendChild(D));K=g("tr");K.appendChild(w);C=g("thead");C.appendChild(K);w=g("table");w.appendChild(C);N=document.createDocumentFragment();for(D=0;D<fa.length;D++){O=g("tr");for(P=0;P<aa.length;++P)if(K=aa[P])C=qa(K)[0],ia=g("td"),ia.insertAdjacentHTML("beforeend",fa[D][C]),ia.setAttribute("data-column",K[C]),O.appendChild(ia);N.appendChild(O)}fa=g("tbody");fa.appendChild(N);w.appendChild(fa);
Z.appendChild(w)}if(M&&B||!M&&(B||J))ma.appendChild(Z),S.appendChild(ma)}a=g("div");T=g("button");q=g("button");a.id="s-bns";T.id="s-sv-bn";q.id="s-all-bn";T.className="c-bn";q.className="c-bn";T.insertAdjacentHTML("beforeend",b.languages[f.current_lang].settings_modal.save_settings_btn);q.insertAdjacentHTML("beforeend",b.languages[f.current_lang].settings_modal.accept_all_btn);a.appendChild(q);if(b=b.languages[f.current_lang].settings_modal.reject_all_btn)v=g("button"),v.id="s-rall-bn",v.className=
t||window.event;27===t.keyCode&&k.hideSettings(0)},!0);H(q,"click",function(){k.hideSettings(0)});W=b.languages[f.current_lang].settings_modal.blocks;aa=b.languages[f.current_lang].settings_modal.cookie_table_headers;q=W.length;n.insertAdjacentHTML("beforeend",b.languages[f.current_lang].settings_modal.title);for(var v=0;v<q;++v){var C=W[v].title,J=W[v].description,M=W[v].toggle,fa=W[v].cookie_table,K=!0===b.remove_cookie_tables,w=J&&"truthy"||!K&&fa&&"truthy",ma=g("div"),Z=g("div");if(J){var T=g("div");
T.className="p";T.insertAdjacentHTML("beforeend",J)}var B=g("div");B.className="title";ma.className="c-bl";Z.className="desc";if("undefined"!==typeof M){var N="c-ac-"+v,ha=w?g("button"):g("div"),D=g("label"),O=g("input"),P=g("span"),ia=g("span"),Sa=g("span"),Ta=g("span");ha.className=w?"b-tl exp":"b-tl";D.className="b-tg";O.className="c-tgl";Sa.className="on-i";Ta.className="off-i";P.className="c-tg";ia.className="t-lb";w&&(ha.setAttribute("aria-expanded","false"),ha.setAttribute("aria-controls",
N));O.type="checkbox";P.setAttribute("aria-hidden","true");var Ka=M.value;O.value=Ka;ia[e]=C;ha.insertAdjacentHTML("beforeend",C);B.appendChild(ha);P.appendChild(Sa);P.appendChild(Ta);a?-1<E(r.level,Ka)?(O.checked=!0,Q.push(!0)):Q.push(!1):M.enabled?(O.checked=!0,Q.push(!0)):Q.push(!1);F.push(Ka);M.readonly?(O.disabled=!0,I(P,"c-ro"),va.push(!0)):va.push(!1);I(Z,"b-acc");I(B,"b-bn");I(ma,"b-ex");Z.id=N;Z.setAttribute("aria-hidden","true");D.appendChild(O);D.appendChild(P);D.appendChild(ia);B.appendChild(D);
w&&function(t,y,ca){H(ha,"click",function(){Ua(y,"act")?(La(y,"act"),ca.setAttribute("aria-expanded","false"),t.setAttribute("aria-hidden","true")):(I(y,"act"),ca.setAttribute("aria-expanded","true"),t.setAttribute("aria-hidden","false"))},!1)}(Z,ma,ha)}else C&&(w=g("div"),w.className="b-tl",w.setAttribute("role","heading"),w.setAttribute("aria-level","3"),w.insertAdjacentHTML("beforeend",C),B.appendChild(w));C&&ma.appendChild(B);J&&Z.appendChild(T);if(!K&&"undefined"!==typeof fa){w=document.createDocumentFragment();
for(N=0;N<aa.length;++N)D=g("th"),K=aa[N],D.setAttribute("scope","col"),K&&(B=K&&qa(K)[0],D[e]=aa[N][B],w.appendChild(D));K=g("tr");K.appendChild(w);B=g("thead");B.appendChild(K);w=g("table");w.appendChild(B);N=document.createDocumentFragment();for(D=0;D<fa.length;D++){O=g("tr");for(P=0;P<aa.length;++P)if(K=aa[P])B=qa(K)[0],ia=g("td"),ia.insertAdjacentHTML("beforeend",fa[D][B]),ia.setAttribute("data-column",K[B]),O.appendChild(ia);N.appendChild(O)}fa=g("tbody");fa.appendChild(N);w.appendChild(fa);
Z.appendChild(w)}if(M&&C||!M&&(C||J))ma.appendChild(Z),S.appendChild(ma)}a=g("div");T=g("button");q=g("button");a.id="s-bns";T.id="s-sv-bn";q.id="s-all-bn";T.className="c-bn";q.className="c-bn";T.insertAdjacentHTML("beforeend",b.languages[f.current_lang].settings_modal.save_settings_btn);q.insertAdjacentHTML("beforeend",b.languages[f.current_lang].settings_modal.accept_all_btn);a.appendChild(q);if(b=b.languages[f.current_lang].settings_modal.reject_all_btn)v=g("button"),v.id="s-rall-bn",v.className=
"c-bn",v.insertAdjacentHTML("beforeend",b),H(v,"click",function(){k.hideSettings();k.hide();k.accept([])}),R.className="bns-t",a.appendChild(v);a.appendChild(T);H(T,"click",function(){k.hideSettings();k.hide();k.accept()});H(q,"click",function(){k.hideSettings();k.hide();k.accept("all")});p.appendChild(n);p.appendChild(Y);R.appendChild(p);R.appendChild(S);R.appendChild(a);m.appendChild(R);l.appendChild(m);h.appendChild(l);G.appendChild(h);c.appendChild(G);c.appendChild(z);(Xa||document.body).appendChild(L)},
ab=function(a){var b=document.querySelectorAll(".c-tgl")||[],c=[],d=!1;if(0<b.length){for(var e=0;e<b.length;e++)-1!==E(a,F[e])?(b[e].checked=!0,Q[e]||(c.push(F[e]),Q[e]=!0)):(b[e].checked=!1,Q[e]&&(c.push(F[e]),Q[e]=!1));if(f.autoclear_cookies&&V&&0<c.length){b=W.length;e=-1;var h=ta("","all"),l=[f.cookie_domain,"."+f.cookie_domain];if("www."===f.cookie_domain.slice(0,4)){var m=f.cookie_domain.substr(4);l.push(m);l.push("."+m)}for(m=0;m<b;m++){var n=W[m];if(Object.prototype.hasOwnProperty.call(n,
"toggle")&&!Q[++e]&&Object.prototype.hasOwnProperty.call(n,"cookie_table")&&-1<E(c,n.toggle.value)){var p=n.cookie_table,q=qa(aa[0])[0],Y=p.length;"on_disable"===n.toggle.reload&&(d=!0);for(var S=0;S<Y;S++){var z=p[S],v=[],B=z[q],J=z.is_regex||!1,M=z.domain||null;z=z.path||!1;M&&(l=[M,"."+M]);if(J)for(J=0;J<h.length;J++)h[J].match(B)&&v.push(h[J]);else B=E(h,B),-1<B&&v.push(h[B]);0<v.length&&(Va(v,z,l),"on_clear"===n.toggle.reload&&(d=!0))}}}}}r={level:a,revision:f.revision,data:A,rfc_cookie:f.use_rfc_cookie};
if(!V||0<c.length||!ba)ba=!0,Ma(f.cookie_name,JSON.stringify(r)),Na();V?("function"===typeof Aa&&0<c.length&&Aa(r,c),d&&window.location.reload()):("function"===typeof Ba&&Ba(k.getUserPreferences()),"function"===typeof za&&za(r),V=!0)},bb=function(a,b){if("string"!==typeof a||""===a||document.getElementById("cc--style"))b();else{var c=g("style");c.id="cc--style";var d=new XMLHttpRequest;d.onreadystatechange=function(){4===this.readyState&&200===this.status&&(c.setAttribute("type","text/css"),c.styleSheet?
"toggle")&&!Q[++e]&&Object.prototype.hasOwnProperty.call(n,"cookie_table")&&-1<E(c,n.toggle.value)){var p=n.cookie_table,q=qa(aa[0])[0],Y=p.length;"on_disable"===n.toggle.reload&&(d=!0);for(var S=0;S<Y;S++){var z=p[S],v=[],C=z[q],J=z.is_regex||!1,M=z.domain||null;z=z.path||!1;M&&(l=[M,"."+M]);if(J)for(J=0;J<h.length;J++)h[J].match(C)&&v.push(h[J]);else C=E(h,C),-1<C&&v.push(h[C]);0<v.length&&(Va(v,z,l),"on_clear"===n.toggle.reload&&(d=!0))}}}}}r={level:a,revision:f.revision,data:A,rfc_cookie:f.use_rfc_cookie};
if(!V||0<c.length||!ba)ba=!0,Ma(f.cookie_name,JSON.stringify(r)),Na();V?("function"===typeof Aa&&0<c.length&&Aa(r,c),d&&window.location.reload()):("function"===typeof Ba&&Ba(k.getUserPreferences(),r),"function"===typeof za&&za(r),V=!0)},bb=function(a,b){if("string"!==typeof a||""===a||document.getElementById("cc--style"))b();else{var c=g("style");c.id="cc--style";var d=new XMLHttpRequest;d.onreadystatechange=function(){4===this.readyState&&200===this.status&&(c.setAttribute("type","text/css"),c.styleSheet?
c.styleSheet.cssText=this.responseText:c.appendChild(document.createTextNode(this.responseText)),document.getElementsByTagName("head")[0].appendChild(c),b())};d.open("GET",a);d.send()}},E=function(a,b){for(var c=a.length,d=0;d<c;d++)if(a[d]===b)return d;return-1},g=function(a){var b=document.createElement(a);"button"===a&&b.setAttribute("type",a);return b},cb=function(){var a=!1,b=!1;H(document,"keydown",function(c){c=c||window.event;"Tab"===c.key&&(u&&(c.shiftKey?document.activeElement===u[0]&&(u[1].focus(),

@@ -36,9 +36,9 @@ c.preventDefault()):document.activeElement===u[1]&&(u[0].focus(),c.preventDefault()),b||oa||(b=!0,!a&&c.preventDefault(),c.shiftKey?u[3]?u[2]?u[2].focus():u[0].focus():u[1].focus():u[3]?u[3].focus():u[0].focus())),!b&&(a=!0))});document.contains&&H(L,"click",function(c){c=c||window.event;ya?R.contains(c.target)?oa=!0:(k.hideSettings(0),oa=!1):na&&x.contains(c.target)&&(oa=!0)},!0)},Wa=function(a,b){function c(e,h,l,m,n,p,q){p=p&&p.split(" ")||[];if(-1<E(h,n)&&(I(e,n),("bar"!==n||"middle"!==p[0])&&

if(m)return}d(e,++h)}};d(a,0)}};k.set=function(a,b){switch(a){case "data":a=b.value;var c=!1;if("update"===b.mode)if(A=k.get("data"),(b=typeof A===typeof a)&&"object"===typeof A){!A&&(A={});for(var d in a)A[d]!==a[d]&&(A[d]=a[d],c=!0)}else!b&&A||A===a||(A=a,c=!0);else A=a,c=!0;c&&(r.data=A,Ma(f.cookie_name,JSON.stringify(r)));return c;case "revision":return d=b.value,a=b.prompt_consent,b=b.message,L&&"number"===typeof d&&r.revision!==d?(Ca=!0,Qa=b,ba=!1,f.revision=d,!0===a?(Ja(Ia),Wa(Ia.gui_options,
!0),Pa(),k.show()):k.accept(),b=!0):b=!1,b;default:return!1}};k.get=function(a,b){return JSON.parse(ta(b||f.cookie_name,"one",!0)||"{}")[a]};k.getConfig=function(a){return f[a]};k.getUserPreferences=function(){return{accept_type:Da,accepted_categories:pa,rejected_categories:Ea}};k.loadScript=function(a,b,c){var d="function"===typeof b;if(document.querySelector('script[src="'+a+'"]'))d&&b();else{var e=g("script");if(c&&0<c.length)for(var h=0;h<c.length;++h)c[h]&&e.setAttribute(c[h].name,c[h].value);
d&&(e.readyState?e.onreadystatechange=function(){if("loaded"===e.readyState||"complete"===e.readyState)e.onreadystatechange=null,b()}:e.onload=b);e.src=a;(document.head?document.head:document.getElementsByTagName("head")[0]).appendChild(e)}};k.updateScripts=function(){Na()};k.show=function(a){U&&setTimeout(function(){I(ka,"show--consent");x.setAttribute("aria-hidden","false");na=!0;setTimeout(function(){ua=document.activeElement;u=Ga},200)},0<a?a:0)};k.hide=function(){U&&(La(ka,"show--consent"),x.setAttribute("aria-hidden",
"true"),na=!1,setTimeout(function(){ua.focus();u=null},200))};k.hideSettings=function(){La(ka,"show--settings");ya=!1;G.setAttribute("aria-hidden","true");setTimeout(function(){na?(Fa&&Fa.focus(),u=Ga):(ua.focus(),u=null);oa=!1},200)};k.accept=function(a,b){a=a||void 0;var c=b||[];b=[];var d=function(){for(var h=document.querySelectorAll(".c-tgl")||[],l=[],m=0;m<h.length;m++)h[m].checked&&l.push(h[m].value);return l};if(a)if("object"===typeof a&&"number"===typeof a.length)for(var e=0;e<a.length;e++)-1!==
E(F,a[e])&&b.push(a[e]);else"string"===typeof a&&("all"===a?b=F.slice():-1!==E(F,a)&&b.push(a));else b=d();if(1<=c.length)for(e=0;e<c.length;e++)b=b.filter(function(h){return h!==c[e]});for(e=0;e<F.length;e++)!0===va[e]&&-1===E(b,F[e])&&b.push(F[e]);pa=b;a=va.filter(function(h){return!0===h}).length;Ea=F.filter(function(h){return-1===E(pa,h)});Da=pa.length===F.length?"all":0<=Ea.length&&pa.length===a?"necessary":"custom";ab(b)};k.eraseCookies=function(a,b,c){var d=[];c=c?[c,"."+c]:[f.cookie_domain,
"."+f.cookie_domain];if("object"===typeof a&&0<a.length)for(var e=0;e<a.length;e++)this.validCookie(a[e])&&d.push(a[e]);else this.validCookie(a)&&d.push(a);Va(d,b,c)};var Ma=function(a,b){var c=f.cookie_expiration;"number"===typeof f.cookie_necessary_only_expiration&&"necessary"===Da&&(c=f.cookie_necessary_only_expiration);b=f.use_rfc_cookie?encodeURIComponent(b):b;var d=new Date;d.setTime(d.getTime()+864E5*c);c="; expires="+d.toUTCString();a=a+"="+(b||"")+c+"; Path="+f.cookie_path+";";a+=" SameSite="+
f.cookie_same_site+";";-1<window.location.hostname.indexOf(".")&&(a+=" Domain="+f.cookie_domain+";");"https:"===window.location.protocol&&(a+=" Secure;");document.cookie=a},ta=function(a,b,c){var d;if("one"===b){if((d=(d=document.cookie.match("(^|;)\\s*"+a+"\\s*=\\s*([^;]+)"))?c?d.pop():a:"")&&a===f.cookie_name){try{d=JSON.parse(d)}catch(e){try{d=JSON.parse(decodeURIComponent(d))}catch(h){d={}}}d=JSON.stringify(d)}}else if("all"===b)for(a=document.cookie.split(/;\s*/),d=[],b=0;b<a.length;b++)d.push(a[b].split("=")[0]);
return d},Va=function(a,b,c){b=b?b:"/";for(var d=0;d<a.length;d++)for(var e=0;e<c.length;e++)document.cookie=a[d]+"=; path="+b+(-1<c[e].indexOf(".")?"; domain="+c[e]:"")+"; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"};k.validCookie=function(a){return""!==ta(a,"one",!0)};var H=function(a,b,c,d){a.addEventListener?!0===d?a.addEventListener(b,c,{passive:!0}):a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)},qa=function(a){if("object"===typeof a){var b=[],c=0;for(b[c++]in a);return b}},I=function(a,b){a.classList?
a.classList.add(b):Ua(a,b)||(a.className+=" "+b)},La=function(a,b){a.classList?a.classList.remove(b):a.className=a.className.replace(new RegExp("(\\s|^)"+b+"(\\s|$)")," ")},Ua=function(a,b){return a.classList?a.classList.contains(b):!!a.className.match(new RegExp("(\\s|^)"+b+"(\\s|$)"))};return k};"function"!==typeof window.initCookieConsent&&(window.initCookieConsent=db)})();
!0),Pa(),k.show()):k.accept(),b=!0):b=!1,b;default:return!1}};k.get=function(a,b){return JSON.parse(ta(b||f.cookie_name,"one",!0)||"{}")[a]};k.getConfig=function(a){return f[a]};k.getUserPreferences=function(){pa=r.level||[];var a=va.filter(function(b){return!0===b}).length;Ea=F.filter(function(b){return-1===E(pa,b)});Da=pa.length===F.length?"all":0<=Ea.length&&pa.length===a?"necessary":"custom";return{accept_type:Da,accepted_categories:pa,rejected_categories:Ea}};k.loadScript=function(a,b,c){var d=
"function"===typeof b;if(document.querySelector('script[src="'+a+'"]'))d&&b();else{var e=g("script");if(c&&0<c.length)for(var h=0;h<c.length;++h)c[h]&&e.setAttribute(c[h].name,c[h].value);d&&(e.readyState?e.onreadystatechange=function(){if("loaded"===e.readyState||"complete"===e.readyState)e.onreadystatechange=null,b()}:e.onload=b);e.src=a;(document.head?document.head:document.getElementsByTagName("head")[0]).appendChild(e)}};k.updateScripts=function(){Na()};k.show=function(a){U&&setTimeout(function(){I(ka,
"show--consent");x.setAttribute("aria-hidden","false");na=!0;setTimeout(function(){ua=document.activeElement;u=Ga},200)},0<a?a:0)};k.hide=function(){U&&(La(ka,"show--consent"),x.setAttribute("aria-hidden","true"),na=!1,setTimeout(function(){ua.focus();u=null},200))};k.hideSettings=function(){La(ka,"show--settings");ya=!1;G.setAttribute("aria-hidden","true");setTimeout(function(){na?(Fa&&Fa.focus(),u=Ga):(ua.focus(),u=null);oa=!1},200)};k.accept=function(a,b){a=a||void 0;var c=b||[];b=[];var d=function(){for(var h=
document.querySelectorAll(".c-tgl")||[],l=[],m=0;m<h.length;m++)h[m].checked&&l.push(h[m].value);return l};if(a)if("object"===typeof a&&"number"===typeof a.length)for(var e=0;e<a.length;e++)-1!==E(F,a[e])&&b.push(a[e]);else"string"===typeof a&&("all"===a?b=F.slice():-1!==E(F,a)&&b.push(a));else b=d();if(1<=c.length)for(e=0;e<c.length;e++)b=b.filter(function(h){return h!==c[e]});for(e=0;e<F.length;e++)!0===va[e]&&-1===E(b,F[e])&&b.push(F[e]);ab(b)};k.eraseCookies=function(a,b,c){var d=[];c=c?[c,"."+
c]:[f.cookie_domain,"."+f.cookie_domain];if("object"===typeof a&&0<a.length)for(var e=0;e<a.length;e++)this.validCookie(a[e])&&d.push(a[e]);else this.validCookie(a)&&d.push(a);Va(d,b,c)};var Ma=function(a,b){var c=f.cookie_expiration;"number"===typeof f.cookie_necessary_only_expiration&&"necessary"===Da&&(c=f.cookie_necessary_only_expiration);b=f.use_rfc_cookie?encodeURIComponent(b):b;var d=new Date;d.setTime(d.getTime()+864E5*c);c="; expires="+d.toUTCString();a=a+"="+(b||"")+c+"; Path="+f.cookie_path+
";";a+=" SameSite="+f.cookie_same_site+";";-1<window.location.hostname.indexOf(".")&&(a+=" Domain="+f.cookie_domain+";");"https:"===window.location.protocol&&(a+=" Secure;");document.cookie=a},ta=function(a,b,c){var d;if("one"===b){if((d=(d=document.cookie.match("(^|;)\\s*"+a+"\\s*=\\s*([^;]+)"))?c?d.pop():a:"")&&a===f.cookie_name){try{d=JSON.parse(d)}catch(e){try{d=JSON.parse(decodeURIComponent(d))}catch(h){d={}}}d=JSON.stringify(d)}}else if("all"===b)for(a=document.cookie.split(/;\s*/),d=[],b=0;b<
a.length;b++)d.push(a[b].split("=")[0]);return d},Va=function(a,b,c){b=b?b:"/";for(var d=0;d<a.length;d++)for(var e=0;e<c.length;e++)document.cookie=a[d]+"=; path="+b+(-1<c[e].indexOf(".")?"; domain="+c[e]:"")+"; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"};k.validCookie=function(a){return""!==ta(a,"one",!0)};var H=function(a,b,c,d){a.addEventListener?!0===d?a.addEventListener(b,c,{passive:!0}):a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)},qa=function(a){if("object"===typeof a){var b=[],c=0;for(b[c++]in a);
return b}},I=function(a,b){a.classList?a.classList.add(b):Ua(a,b)||(a.className+=" "+b)},La=function(a,b){a.classList?a.classList.remove(b):a.className=a.className.replace(new RegExp("(\\s|^)"+b+"(\\s|$)")," ")},Ua=function(a,b){return a.classList?a.classList.contains(b):!!a.className.match(new RegExp("(\\s|^)"+b+"(\\s|$)"))};return k};"function"!==typeof window.initCookieConsent&&(window.initCookieConsent=db)})();
{
"name": "vanilla-cookieconsent",
"version": "2.7.0",
"version": "2.7.1",
"description": "🍪 Simple cross-browser cookie-consent plugin written in vanilla js.",

@@ -5,0 +5,0 @@ "main": "dist/cookieconsent.js",

@@ -50,4 +50,4 @@ [Forked](https://github.com/orestbida/cookieconsent) to publish in the NPM registry. No further

# CDN links
https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@v2.7.0/dist/cookieconsent.js
https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@v2.7.0/dist/cookieconsent.css
https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@v2.7.1/dist/cookieconsent.js
https://cdn.jsdelivr.net/gh/orestbida/cookieconsent@v2.7.1/dist/cookieconsent.css
```

@@ -54,0 +54,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc