@lu-development/ux-gdpr-consent
Advanced tools
Comparing version 2.0.8 to 2.0.9
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,b){a.raw=b;return a};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)}; | ||
var GDPR=function(){}; | ||
GDPR.check=function(){var a=this;if(this.getCookie("gdpr-consent"))return!1;if(this.getCookie("gdpr-consent-waiting"))return this.popupDisplay();fetch("https://api.ipstack.com/check?access_key=f66ace327d220485678516d16bb6a230&fields=location.is_eu").then(function(b){if(!b.ok)throw console.log(b),console.log("Check Failed."),Error("Something went wrong with the API call");return b.json()}).then(function(b){b=JSON.parse(JSON.stringify(b));if(!b.location)throw Error("Return unexpected.");b.location.is_eu|| | ||
b.location.is_eu?(a.setCookie("gdpr-consent-waiting","true",1),a.popupDisplay()):(a.setCookie("gdpr-consent","true",1),a.setCookie("gdpr-grant-type","implicit",1))})};GDPR.grant=function(){this.setCookie("gdpr-consent","true",7);this.setCookie("gdpr-grant-type","explicit",7);this.popupHide()};GDPR.deny=function(){this.setCookie("gdpr-consent","false",7);this.popupHide()}; | ||
b.location.is_eu?(a.setCookie("gdpr-consent-waiting","true",1),a.popupDisplay()):(a.setCookie("gdpr-consent","true",1),a.setCookie("gdpr-grant-type","implicit",1))})};GDPR.grant=function(){this.setCookie("gdpr-consent","true",7);this.setCookie("gdpr-grant-type","explicit",7);window.dataLayer&&window.dataLayer.push({event:"gdpr-consent-grant"});this.popupHide()};GDPR.deny=function(){this.setCookie("gdpr-consent","false",7);window.dataLayer&&window.dataLayer.push({event:"gdpr-consent-deny"});this.popupHide()}; | ||
GDPR.popupDisplay=function(){var a=document.querySelector("ux-gdpr-consent");a||(a=document.createElement("ux-gdpr-consent"));(function(c,d){for(var e in d)c.setAttribute(e,d[e])})(a,{id:"consentDialog",role:"dialog","aria-modal":"false","aria-labelledby":"ux-gdpr__label","aria-describedby":"ux-gdpr__description","class":"hydrated"});document.body.appendChild(a);a=document.getElementById("consentDialog").attachShadow({mode:"open"});a.innerHTML=this.style();a.innerHTML+='\n<div class="ux-gdpr__text-container">\n <h2 class="ux-gdpr__header" id="ux-gdpr__label">Do you agree to Liberty University\u2019s use of cookies?</h2>\n <p class="ux-gdpr__description" id="ux-gdpr__description">We use cookies to deliver online services, customize your experience, and assist with communication. For more information see the <a href="https://wiki.os.liberty.edu/display/IE/Website+Privacy+Policy" target="_blank" class="ux-gdpr__link" tabindex="0">Privacy Policy</a> and <a href="https://wiki.os.liberty.edu/display/IE/GDPR+Privacy+Notice" target="_blank" class="ux-gdpr__link" tabindex="0">GDPR Privacy Notice</a>.</p>\n</div>\n<div class="ux-gdpr__action-container">\n <button class="ux-gdpr__button_grant" aria-describedby="ux-gdpr__description" tabindex="1">I Agree</button>\n <button class="ux-gdpr__button_revoke" aria-describedby="ux-gdpr__description" tabindex="1">I Do Not Agree</button>\n</div>'; | ||
@@ -6,0 +6,0 @@ var b=this;this.clickBinding(".ux-gdpr__button_grant",function(){b.grant()});this.clickBinding(".ux-gdpr__button_revoke",function(){b.deny()})};GDPR.clickBinding=function(a,b){document.addEventListener("click",function(c){c.path[0].matches(a)&&(console.log("testing"),b())},!1)};GDPR.popupHide=function(){this.deleteCookie("gdpr-consent-waiting");console.log(document.querySelector("ux-gdpr-consent"));document.querySelector("ux-gdpr-consent").setAttribute("hidden","hidden")}; |
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,b){a.raw=b;return a};$jscomp.arrayIteratorImpl=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):$jscomp.arrayIterator(a)}; | ||
var GDPR=function(){}; | ||
GDPR.check=function(){var a=this;if(this.getCookie("gdpr-consent"))return!1;if(this.getCookie("gdpr-consent-waiting"))return this.popupDisplay();fetch("https://api.ipstack.com/check?access_key=f66ace327d220485678516d16bb6a230&fields=location.is_eu").then(function(b){if(!b.ok)throw console.log(b),console.log("Check Failed."),Error("Something went wrong with the API call");return b.json()}).then(function(b){b=JSON.parse(JSON.stringify(b));if(!b.location)throw Error("Return unexpected.");b.location.is_eu|| | ||
b.location.is_eu?(a.setCookie("gdpr-consent-waiting","true",1),a.popupDisplay()):(a.setCookie("gdpr-consent","true",1),a.setCookie("gdpr-grant-type","implicit",1))})};GDPR.grant=function(){this.setCookie("gdpr-consent","true",7);this.setCookie("gdpr-grant-type","explicit",7);this.popupHide()};GDPR.deny=function(){this.setCookie("gdpr-consent","false",7);this.popupHide()}; | ||
b.location.is_eu?(a.setCookie("gdpr-consent-waiting","true",1),a.popupDisplay()):(a.setCookie("gdpr-consent","true",1),a.setCookie("gdpr-grant-type","implicit",1))})};GDPR.grant=function(){this.setCookie("gdpr-consent","true",7);this.setCookie("gdpr-grant-type","explicit",7);window.dataLayer&&window.dataLayer.push({event:"gdpr-consent-grant"});this.popupHide()};GDPR.deny=function(){this.setCookie("gdpr-consent","false",7);window.dataLayer&&window.dataLayer.push({event:"gdpr-consent-deny"});this.popupHide()}; | ||
GDPR.popupDisplay=function(){var a=document.querySelector("ux-gdpr-consent");a||(a=document.createElement("ux-gdpr-consent"));(function(c,d){for(var e in d)c.setAttribute(e,d[e])})(a,{id:"consentDialog",role:"dialog","aria-modal":"false","aria-labelledby":"ux-gdpr__label","aria-describedby":"ux-gdpr__description","class":"hydrated"});document.body.appendChild(a);a=document.getElementById("consentDialog").attachShadow({mode:"open"});a.innerHTML=this.style();a.innerHTML+='\n<div class="ux-gdpr__text-container">\n <h2 class="ux-gdpr__header" id="ux-gdpr__label">Do you agree to Liberty University\u2019s use of cookies?</h2>\n <p class="ux-gdpr__description" id="ux-gdpr__description">We use cookies to deliver online services, customize your experience, and assist with communication. For more information see the <a href="https://wiki.os.liberty.edu/display/IE/Website+Privacy+Policy" target="_blank" class="ux-gdpr__link" tabindex="0">Privacy Policy</a> and <a href="https://wiki.os.liberty.edu/display/IE/GDPR+Privacy+Notice" target="_blank" class="ux-gdpr__link" tabindex="0">GDPR Privacy Notice</a>.</p>\n</div>\n<div class="ux-gdpr__action-container">\n <button class="ux-gdpr__button_grant" aria-describedby="ux-gdpr__description" tabindex="1">I Agree</button>\n <button class="ux-gdpr__button_revoke" aria-describedby="ux-gdpr__description" tabindex="1">I Do Not Agree</button>\n</div>'; | ||
@@ -6,0 +6,0 @@ var b=this;this.clickBinding(".ux-gdpr__button_grant",function(){b.grant()});this.clickBinding(".ux-gdpr__button_revoke",function(){b.deny()})};GDPR.clickBinding=function(a,b){document.addEventListener("click",function(c){c.path[0].matches(a)&&(console.log("testing"),b())},!1)};GDPR.popupHide=function(){this.deleteCookie("gdpr-consent-waiting");console.log(document.querySelector("ux-gdpr-consent"));document.querySelector("ux-gdpr-consent").setAttribute("hidden","hidden")}; |
{ | ||
"name": "@lu-development/ux-gdpr-consent", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "GDPR compliance plugin", | ||
@@ -5,0 +5,0 @@ "unpkg": "dist/ux-gdpr-consent/ux-gdpr-consent.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
28171
58
2