Changes

MediaWiki:Common.js

3,077 bytes added, 16:49, 27 June 2023
m
no edit summary
theme : 'white'
};
 
 
/* emulate sticky CSS
if (document.getElementById('p-Matched_content') !=null) {
window.onscroll = function() {
var header_height = document.getElementById("p-Matched_content").scrollHeight;
if (window.scrollY + 330 > header_height){
document.getElementById("p-Matched_content").style.position="fixed";
document.getElementById("p-Matched_content").style.top="0px";
}
else{
document.getElementById("p-Matched_content").style.position="static";
}
}
}
 
if (document.getElementById('p-advertisement') !=null) {
window.onscroll = function() {
var header_height = document.getElementById("p-advertisement").scrollHeight;
if (window.scrollY + 330 > header_height){
document.getElementById("p-advertisement").style.position="fixed";
document.getElementById("p-advertisement").style.top="0px";
}
else{
document.getElementById("p-advertisement").style.position="static";
}
}
}
*/
/* if GDPR_table_rejected exists, remove it */
let var 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 var GDPR_table_undecided = document.getElementById("GDPR_table_undecided");
if (typeof(GDPR_table_undecided) !== 'undefined' && GDPR_table_undecided!== null){
GDPR_table_undecided.remove();
}
// display the cookie
var GDPR_cookie = "GDPR=accepted";
GDPR_table_undecided.appendChild(GDPR_row);
GDPR_row.appendChild(GDPR_cell);
 
GDPR_cell.appendChild(document.createElement("br"));
 
 
GDPR_cell.appendChild(document.createTextNode("This site requires the use of cookies to comply with the "));
 
var a = document.createElement('a');
var GDPR_link = document.createTextNode("GDPR ");
a.appendChild(GDPR_link);
a.href = "https://en.wikipedia.org/wiki/General_Data_Protection_Regulation";
a.title = a.href;
GDPR_cell.appendChild(a);
 
GDPR_cell.appendChild(document.createTextNode(" and "));
 
var a = document.createElement('a');
var GOOGLE_link = document.createTextNode("Google's privacy policy");
a.appendChild(GOOGLE_link);
a.href = "https://policies.google.com/privacy";
a.title = a.href;
GDPR_cell.appendChild(a);
GDPR_cell.appendChild(document.createTextNode(". Cookies are used for "));
 
var a = document.createElement('a');
var GOOGLE_ADS_link = document.createTextNode("ads personaliation");
a.appendChild(GOOGLE_ADS_link);
a.href = "https://policies.google.com/technologies/partner-sites";
a.title = a.href;
GDPR_cell.appendChild(a);
GDPR_cell.appendChild(document.createTextNode("."));
 
GDPR_cell.appendChild(document.createElement("br"));
 
GDPR_cell.appendChild(GDPR_reject_button);
GDPR_cell.appendChild(GDPR_accept_button);
 
 
document.body.appendChild(GDPR_table_undecided);
GDPR_table_undecided.style.width="100%";
GDPR_table_undecided.style.borderbackgroundColor="#f4d500"; /* yellow */GDPR_table_undecided.style.backgroundColor="#f9f9f9";GDPR_table_undecided.style.borderTop="dashed 1px dashed blue#3f8a50";GDPR_table_undecided.style.opacity="95%";
GDPR_table_undecided.style.textAlign="center";
GDPR_table_undecided.style.position="fixed";
GDPR_table_undecided.style.bottom="0";
GDPR_reject_button.style.border="1px solid green";
GDPR_accept_button.style.border="1px solid green";
GDPR_table_undecided.style.verticalAlign="middle"; /* some old IE convention */
/* reject button styles */GDPR_reject_button.style.backgroundColor="#d34603";GDPR_reject_button.style.color="#fffcf3";GDPR_reject_button.style.padding="12px 20px";GDPR_reject_button.style.border="none";GDPR_reject_button.style.textAlign="center";GDPR_reject_button.style.borderRadius=" 20px";GDPR_reject_button.style.cursor="pointer";GDPR_reject_button.style.fontSize="105%";GDPR_reject_button.style.fontWeight="bold";GDPR_reject_button.style.minWidth="160px";GDPR_reject_button.style.display="inline-block";GDPR_reject_button.style.margin="10px";/* accept button styles */GDPR_accept_button.style.backgroundColor="#3f8a50";GDPR_accept_button.style.color="#fffcf3";GDPR_accept_button.style.padding="12px 20px";GDPR_accept_button.style.border="none";GDPR_accept_button.style.textAlign="center";GDPR_accept_button.style.borderRadius=" 20px";GDPR_accept_button.style.cursor="pointer";GDPR_accept_button.style.fontSize="105%";GDPR_accept_button.style.fontWeight="bold";GDPR_accept_button.style.minWidth="160px";GDPR_accept_button.style.display="inline-block";GDPR_accept_button.style.margin="10px";
}
GDPR_cell.appendChild(GDPR_accept_button);
 
 
GDPR_cell.appendChild(document.createElement("br"));
 
GDPR_cell.appendChild(document.createTextNode("This site requires the use of cookies to comply with the "));
 
var a = document.createElement('a');
var GDPR_link = document.createTextNode("GDPR ");
a.appendChild(GDPR_link);
a.href = "https://en.wikipedia.org/wiki/General_Data_Protection_Regulation";
a.title = a.href;
GDPR_cell.appendChild(a);
 
GDPR_cell.appendChild(document.createTextNode(" and "));
 
var a = document.createElement('a');
var GOOGLE_link = document.createTextNode("Google's privacy policy");
a.appendChild(GOOGLE_link);
a.href = "https://policies.google.com/privacy";
a.title = a.href;
GDPR_cell.appendChild(a);
GDPR_cell.appendChild(document.createTextNode(". Cookies are used for "));
 
var a = document.createElement('a');
var GOOGLE_ADS_link = document.createTextNode("ads personaliation");
a.appendChild(GOOGLE_ADS_link);
a.href = "https://policies.google.com/technologies/partner-sites";
a.title = a.href;
GDPR_cell.appendChild(a);
GDPR_cell.appendChild(document.createTextNode("."));
 
GDPR_cell.appendChild(document.createElement("br"));
document.body.appendChild(GDPR_table_rejected);
GDPR_table_rejected.style.width="100%";
GDPR_table_rejected.style.height="100%";
GDPR_table_rejected.style.borderbackgroundColor="1px dashed blue#f9f9f9";GDPR_table_rejected.style.opacity="95%";
GDPR_table_rejected.style.textAlign="center";
GDPR_table_rejected.style.position="fixed";
GDPR_table_rejected.style.bottom="0";
GDPR_accept_button.style.border="1px solid green";
GDPR_table_rejected.style.verticalAlign="middle"; /* some old IE convention */
/* accept button styles */GDPR_accept_button.style.backgroundColor="#3f8a50";GDPR_accept_button.style.color="#fffcf3";GDPR_accept_button.style.padding="12px 20px";GDPR_accept_button.style.border="none";GDPR_accept_button.style.textAlign="center";GDPR_accept_button.style.borderRadius=" 20px";GDPR_accept_button.style.cursor="pointer";GDPR_accept_button.style.fontSize="105%";GDPR_accept_button.style.fontWeight="bold";GDPR_accept_button.style.minWidth="160px";GDPR_accept_button.style.display="inline-block";GDPR_accept_button.style.margin="10px";
}