Changes

Jump to: navigation, search

MediaWiki:Common.js

988 bytes removed, 11:15, 23 June 2023
m
no edit summary
window.addEventListener('load', run_onload, false);
}
 
function accept_cookies(){
 
/* if GDPR_table_rejected exists, remove it */
let GDPR_table_rejected = document.getElementById("GDPR_table_rejected");
if (typeof(GDPR_table_rejected) !== 'undefined' && GDPR_table_rejected!== null){
GDPR_table_rejected.remove();
}
 
/* if GDPR_table_undecided exists, remove it */
let GDPR_table_undecided = document.getElementById("GDPR_table_undecided");
if (typeof(GDPR_table_undecided) !== 'undefined' && GDPR_table_undecided!== null){
GDPR_table_undecided.remove();
}
 
var GDPR_cookie = "GDPR=accepted";
 
var GDPR_year = new Date(); // create date
GDPR_year.setFullYear(GDPR_year.getFullYear() +1) // add 1 year from now
var GDPR_end = "expires=" + GDPR_year.toGMTString() + ";path=/; samesite=strict"; // make endcookie and path variable
// var GDPR_end = "expires=0;path=/; samesite=strict"; // make endcookie and path variable
 
document.cookie = GDPR_cookie + ";" + GDPR_end;
console.log("Added cookie: " + document.cookie);
 
accepted();
 
console.log("accept cookies");
}
 
GDPR_table_undecided.style.verticalAlign="middle"; /* some old IE convention */
console.log("undecided");
}

Navigation menu