HotFix: Decline allow

This commit is contained in:
José Luis Garrido Labrador
2018-10-24 12:36:07 +02:00
parent db1858772b
commit 5c66845c28
3 changed files with 27 additions and 16 deletions

View File

@@ -154,6 +154,10 @@ function onScroll() {
//From https://stackoverflow.com/questions/35297919/javascript-select-all-text-inside-a-pre-code-block-on-double-click
window.onload = function(){
if(!comprobarCookie('cookieconsent_status') || obtenerCookie('cookieconsent_status')=='deny'){
deleteCookies();
}
document.body.addEventListener('dblclick', function(e){
var target = e.target || e.srcElement;
if (target.className.indexOf("highlight") !== -1 || target.parentNode.className.indexOf("highlight") !== -1){
@@ -174,4 +178,11 @@ window.onload = function(){
}
});
};
};
function deleteCookies() {
var theCookies = document.cookie.split(';');
for (var i = 0 ; i < theCookies.length; i++) {
document.cookie = theCookies[i].split('=')[0] + '=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}
}