Created
October 11, 2017 09:26
-
-
Save diego-betto/5a069028bd88055d8f864b64a4108b87 to your computer and use it in GitHub Desktop.
Iubenda, check consent given in javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function iubendaConsentGiven(){ | |
var pairs = document.cookie.split(";"); | |
var cookies = {}; | |
for (var i=0; i<pairs.length; i++){ | |
var pair = pairs[i].split("="); | |
if(pair[0].indexOf('_iub_cs-s') !== -1 || pair[0].indexOf('_iub_cs') !== -1 ) { | |
return true; | |
} | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment