Changes

Jump to: navigation, search

MediaWiki:Common.js

6,684 bytes added, 16:49, 27 June 2023
m
no edit summary
/* Any JavaScript here will be loaded for all users on every page load. */
//setTimeout("alert('test')",10000);
alert//document.getElementsByTagName('body') //http://www[0].munichbeergardensstyle.com/Test2margin = '110px';
var RecaptchaOptions = {
};
/* start rotating banner */
/* Banner 147x85 */
/* Add image and URL in array and upload/protect image and preload
(first letter or image name must be capitalised) */
/* define the images directory including trailing slash GDPR */ if (window.addEventListener){window.addEventListener('load', run_onload, false);} function accept_cookies(){ /* if GDPR_table_rejected exists, remove it */var beergarden_banner_dir GDPR_table_rejected = document.getElementById("GDPR_table_rejected");if (typeof(GDPR_table_rejected) !== 'undefined' && GDPR_table_rejected!== null){GDPR_table_rejected.remove();} /images/beer* if GDPR_table_undecided exists, remove it */var 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
var beergarden_banners document.cookie = new Array(GDPR_cookie + "Bavarian_tree_pole_banner.png;",+ GDPR_end; "Augustiner_mass_bannerconsole.png"); var beergarden_links = new Arraylog("/SpecialAdded cookie:Random", "/Maß"+ document.cookie);
function start_animationaccepted(){setTimeout('beergarden_blender()',15000); /* 15 second */
}
beergarden_banner0 = new Imagefunction reject_cookies(147,85);{beergarden_banner0.src var GDPR_cookie = beergarden_banner_dir + "Banner1.jpgGDPR=rejected";
beergarden_banner1 var GDPR_year = new ImageDate(147,85);// create datebeergarden_banner1GDPR_year.src setFullYear(GDPR_year.getFullYear() +1) // add 1 year from nowvar GDPR_end = beergarden_banner_dir "expires=" + GDPR_year.toGMTString() + "Banner2.jpg;path=/; samesite=strict"; // make endcookie and path variable// var GDPR_end = "expires=0;path=/; samesite=strict"; // make endcookie and path variable
beergarden_banner2 document.cookie = new Image(147,85)GDPR_cookie + ";" + GDPR_end;beergarden_banner2console.src = beergarden_banner_dir log("Added cookie: " +"Banner3document.jpg"cookie);
beergarden_banner3 = new ImageGDPR_table_undecided.remove(147,85);beergarden_banner3.src = beergarden_banner_dir +"Banner4.jpg"rejected();}
// read cookie and set action here
function run_onload(){
function beergarden_swap(){opacity GDPR_state_value = 0;IE_opacity = 0"undecided";
if (navigatordocument.appVersioncookie.indexOf("MSIEGDPR") != -1){document.getElementById("blendinger").style.filter = "alpha(opacity=0)";interval = setInterval("blendinger_IE()",50)
var state_pos = document.cookie.indexOf("GDPR=");
var state_start = state_pos + 5;
var state_end = state_start + 8;
GDPR_state_value = document.cookie.substring(state_start,state_end);
console.log(GDPR_state_value);
console.log(document.cookie);
}
else {document.getElementByIdif (GDPR_state_value == "blendingeraccepted").style.opacity=0;{interval = setInterval("blendinger_opacityaccepted()",50);
}
 
if (GDPR_state_value == "rejected"){
rejected();
}
function blendinger_IE(){
if (IE_opacity < 100){
IE_opacity = IE_opacity +4;
document.getElementById("blendinger").style.filter = "alpha(opacity="+IE_opacity+")";
if (GDPR_state_value == "undecided"){
undecided();
}
else{clearInterval(interval);IE_count = 0;
}
 
 
function undecided(){
 
var GDPR_table_undecided = document.createElement("table");
GDPR_table_undecided.setAttribute("id","GDPR_table_undecided");
var GDPR_row = document.createElement("tr");
var GDPR_cell = document.createElement("td");
 
var GDPR_reject_button = document.createElement("span");
GDPR_reject_button.setAttribute("id","GDPR_reject_button");
GDPR_reject_button.style.cursor="pointer";
GDPR_reject_button.appendChild(document.createTextNode("REJECT COOKIES"));
 
var GDPR_accept_button = document.createElement("span");
GDPR_accept_button.setAttribute("id","GDPR_accept_button");
GDPR_accept_button.style.cursor="pointer";
GDPR_accept_button.appendChild(document.createTextNode("ACCEPT COOKIES"));
 
GDPR_reject_button.onclick=reject_cookies;
GDPR_accept_button.onclick=accept_cookies;
 
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.backgroundColor="#f4d500"; /* yellow */
GDPR_table_undecided.style.backgroundColor="#f9f9f9";
GDPR_table_undecided.style.borderTop="dashed 1px #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_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";
}
function blendinger_opacityremove_GDPR_cookie(){ if (opacity < 1){opacity = (Mathconsole.floorlog(opacity * 100) "Removed cookie: " +4document.cookie) / 100;document.getElementById(cookie = "blendingerGDPR=; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/; samesite=strict").style.opacity=opacity;
}
else function accepted(){clearIntervalvar cookie_img = document.createElement(interval"img"); cookie_img.setAttribute("id","cookie_img"); /* used for link */cookie_img.onclick=undecided; /* create click event */cookie_img.addEventListener('click', cookie_img.remove); /* add second click event, removing cookie image */cookie_img.addEventListener('click', remove_GDPR_cookie); /* add third click event, removing cookie */ cookie_img.style.cursor="pointer";cookie_img.src = "https://www.munichbeergardens.com/images/beer/Cookie.png";document.body.appendChild(cookie_img); cookie_img.style.position="fixed";cookie_img.style.bottom="5px";cookie_img.style.right="5px";
}
}
function rejected(){ var beergarden_array_index GDPR_table_rejected = beergarden_linksdocument.length -1createElement("table");GDPR_table_rejected.setAttribute("id","GDPR_table_rejected");var first_beergarden_index GDPR_row = Mathdocument.roundcreateElement(beergarden_array_index * Math"tr");var GDPR_cell = document.randomcreateElement("td"); var GDPR_accept_button = document.createElement("span");GDPR_accept_button.setAttribute("id","GDPR_accept_button");GDPR_accept_button.style.cursor="pointer";GDPR_accept_button.appendChild(document.createTextNode("ACCEPT COOKIES")); GDPR_accept_button.onclick=accept_cookies; GDPR_table_rejected.appendChild(GDPR_row);GDPR_row.appendChild(GDPR_cell); GDPR_cell.appendChild(GDPR_accept_button); 
var beergarden_cycle = first_beergarden_index;var beergarden_total = beergarden_bannersGDPR_cell.appendChild(document.length -1;var beergarden_link = beergarden_links[beergarden_cycle]createElement("br")); /* initially the first */
function beergarden_blenderGDPR_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:/* first set current image as background */en.wikipedia.org/wiki/General_Data_Protection_Regulation";a.title = a.href;GDPR_cell.appendChild(a);
GDPR_cell.appendChild(document.getElementByIdcreateTextNode('background_image'" and ").style.backgroundImage='url('+beergarden_banner_dir+beergarden_banners[beergarden_cycle]+')';
beergarden_cycle++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 "));
if var a = document.createElement(beergarden_cycle 'a');var GOOGLE_ADS_link == beergarden_bannersdocument.createTextNode("ads personaliation");a.lengthappendChild(GOOGLE_ADS_link){;beergarden_cycle a.href = 0"https://policies.google.com/technologies/partner-sites";}a.title = a.href; GDPR_cell.appendChild(a);beergarden_swapGDPR_cell.appendChild(document.createTextNode("."));
setTimeoutGDPR_cell.appendChild("document.images.beergarden_animation.src=beergarden_banner_dir + beergarden_banners[beergarden_cycle];createElement("br",10) beergarden_link = beergarden_links[beergarden_cycle] /* update link values */ });
/* end rotaing banner */document.body.appendChild(GDPR_table_rejected);
GDPR_table_rejected.style.width="100%";GDPR_table_rejected.style.height="100%";GDPR_table_rejected.style.backgroundColor="#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_table_rejected.style.verticalAlign="middle"; /* Pad Google AdSense box in portlet in sidebar some old IE convention *//* accept button styles */GDPR_accept_button.style.backgroundColor="#p-googleadsense 3f8a50";GDPR_accept_button.style.pBody {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-top: 5pxblock"; text-align: centerGDPR_accept_button.style.margin="10px";
}

Navigation menu