Changes

Jump to: navigation, search

MediaWiki:Common.js

5,458 bytes added, 16:49, 27 June 2023
m
no edit summary
};
/* start rotating banner */
/* Banner 160x600 */
/* 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 */var beergarden_banner_dir = '/images/beer/';
var beergarden_banners = new Arrayif ("Muhlenpark_01window.jpg", "Aujaeger_03.jpg",addEventListener) "Aujaeger_04_en.jpg",{ "Alter_Wirt_Etterschlag_01window.jpg", "Kneissl_04.jpg"addEventListener('load', "Hofbrauhaus_Keller_Freising_03.jpg"run_onload, "Zur_Einkehr_03.jpg"false);}
/*function accept_cookies(){
Quick workaround without UTF8 aware redirect: Set up page with ASCII and create/* if GDPR_table_rejected exists, remove it */a js-link and wiki redirect page, evar GDPR_table_rejected = document.ggetElementById("GDPR_table_rejected");if (typeof(GDPR_table_rejected) !== 'undefined' && GDPR_table_rejected!== null){GDPR_table_rejected.: Biergarten_Muehlenpark REDIRECT [[Biergarten_Mühlenpark]]remove();alternatively and easier, by-pass the redirect page and don't log clicks}
/* 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 beergarden_links GDPR_cookie = new Array("/admin/munichbeergardens.com/redirect.cgi?urlGDPR=/Biergarten_Muehlenparkaccepted", "/Aujäger", "/Aujäger", "/Alter_Wirt_Etterschlag", "/Räuber-Kneißl-Garten", "Hofbrauhaus_Keller_Freising", "/admin/munichbeergardens.com/redirect.cgi?url=/Rothmeyer%27s_Zur_Einkehr");
function start_animationvar GDPR_year = new Date(){; // create datesetTimeoutGDPR_year.setFullYear('beergarden_blenderGDPR_year.getFullYear()',15000+1) // add 1 year from nowvar GDPR_end = "expires=" + GDPR_year.toGMTString()+ "; path=/* 15 second *; samesite=strict"; // make endcookie and path variable}// var GDPR_end = "expires=0;path=/; samesite=strict"; // make endcookie and path variable
beergarden_banner1 document.cookie = new Image(160,600)GDPR_cookie + ";" + GDPR_end;beergarden_banner1console.src = beergarden_banner_dir log("Added cookie: " + "Muhlenpark_01document.jpg"cookie);
beergarden_banner2 = new Imageaccepted(160,600);beergarden_banner2.src = beergarden_banner_dir + "Aujaeger_03.jpg";}
beergarden_banner3 = new Imagefunction reject_cookies(160,600);{beergarden_banner3.src var GDPR_cookie = beergarden_banner_dir + "Aujaeger_04_en.jpgGDPR=rejected";
beergarden_banner4 var GDPR_year = new ImageDate(160,600);// create datebeergarden_banner4GDPR_year.src setFullYear(GDPR_year.getFullYear() +1) // add 1 year from nowvar GDPR_end = beergarden_banner_dir "expires=" + GDPR_year.toGMTString() + "Alter_Wirt_Etterschlag_01.jpg;path=/; samesite=strict"; // make endcookie and path variable// var GDPR_end = "expires=0;path=/; samesite=strict"; // make endcookie and path variable
beergarden_banner5 document.cookie = new Image(160,600)GDPR_cookie + ";" + GDPR_end;beergarden_banner5console.src = beergarden_banner_dir log("Added cookie: " + "Kneissl_04document.jpg"cookie);
beergarden_banner6 = new ImageGDPR_table_undecided.remove(160,600);beergarden_banner6.src = beergarden_banner_dir + "Zur_Einkehr_03.jpg"rejected();}
beergarden_banner7 = new Image// read cookie and set action herefunction run_onload(160,600);beergarden_banner7.src = beergarden_banner_dir + "Hofbrauhaus_Keller_Freising_03.jpg";{
GDPR_state_value = "undecided";
function beergarden_swapif(document.cookie.indexOf("GDPR") != -1){opacity = 0;IE_opacity = 0;
if (navigatorvar state_pos = document.appVersioncookie.indexOf("MSIEGDPR=") !;var state_start = state_pos + 5;var state_end = -1){ state_start + 8;GDPR_state_value = document.getElementByIdcookie.substring("blendinger"state_start,state_end);console.style.filter = "alphalog(opacity=0GDPR_state_value)";interval = setInterval("blendinger_IEconsole.log(document.cookie)",50);}
if (GDPR_state_value == "accepted"){
accepted();
}
else {document.getElementByIdif (GDPR_state_value == "blendingerrejected").style.opacity=0;{interval = setInterval("blendinger_opacityrejected()",50);
}
 
 
if (GDPR_state_value == "undecided"){
undecided();
}
function blendinger_IE(){
if (IE_opacity < 100){
IE_opacity = IE_opacity +4;
document.getElementById("blendinger").style.filter = "alpha(opacity="+IE_opacity+")";
}
elsefunction undecided(){clearIntervalvar 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(interval"td");IE_count 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 remove_GDPR_cookie(){
console.log("Removed cookie: " + document.cookie);
document.cookie = "GDPR=; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/; samesite=strict";
 
}
 function blendinger_opacityaccepted(){ var cookie_img = document.createElement("img");if cookie_img.setAttribute(opacity < 1"id","cookie_img"){; /* used for link */opacity cookie_img.onclick= undecided; /* create click event */cookie_img.addEventListener(Math'click', cookie_img.remove); /* add second click event, removing cookie image */cookie_img.flooraddEventListener(opacity 'click', remove_GDPR_cookie); /* 100) +4) add third click event, removing cookie */ cookie_img.style.cursor="pointer";cookie_img.src = "https://www.munichbeergardens.com/images/beer/ 100Cookie.png";document.getElementByIdbody.appendChild(cookie_img); cookie_img.style.position="blendingerfixed");cookie_img.style.bottom="5px";cookie_img.style.opacityright=opacity"5px";
}
else{
clearInterval(interval);
}function rejected(){}var GDPR_table_rejected = document.createElement("table");GDPR_table_rejected.setAttribute("id","GDPR_table_rejected");var GDPR_row = document.createElement("tr");var GDPR_cell = document.createElement("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);  GDPR_cell.appendChild(document.createElement("br"));
var beergarden_array_index = beergarden_linksGDPR_cell.length -1;var first_beergarden_index = Math.roundappendChild(beergarden_array_index * Mathdocument.randomcreateTextNode("This site requires the use of cookies to comply with the "));
var beergarden_cycle a = first_beergarden_indexdocument.createElement('a');var beergarden_total GDPR_link = beergarden_bannersdocument.length -1createTextNode("GDPR ");var beergarden_link a.appendChild(GDPR_link);a.href = beergarden_links[beergarden_cycle]; "https://en.wikipedia.org/* initially the first *wiki/General_Data_Protection_Regulation";a.title = a.href;GDPR_cell.appendChild(a);
function beergarden_blenderGDPR_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:/* first set current image as background */policies.google.com/privacy";a.title = a.href;GDPR_cell.appendChild(a);GDPR_cell.appendChild(document.createTextNode(". Cookies are used for "));
var a = document.getElementByIdcreateElement('background_imagea');var GOOGLE_ADS_link = document.stylecreateTextNode("ads personaliation");a.backgroundImageappendChild(GOOGLE_ADS_link);a.href = "https://policies.google.com/technologies/partner-sites";a.title ='urla.href;GDPR_cell.appendChild(a);GDPR_cell.appendChild(document.createTextNode('+beergarden_banner_dir+beergarden_banners[beergarden_cycle]+'"."))';
beergarden_cycle++GDPR_cell.appendChild(document.createElement("br"));
if (beergarden_cycle == beergarden_bannersdocument.body.length){beergarden_cycle = 0;} beergarden_swapappendChild(GDPR_table_rejected);
setTimeout(GDPR_table_rejected.style.width="document100%";GDPR_table_rejected.imagesstyle.beergarden_animationheight="100%";GDPR_table_rejected.style.srcbackgroundColor=beergarden_banner_dir + beergarden_banners[beergarden_cycle]"#f9f9f9";GDPR_table_rejected.style.opacity=",10)95%"; GDPR_table_rejected.style.textAlign="center";beergarden_link GDPR_table_rejected.style.position= beergarden_links[beergarden_cycle] "fixed";GDPR_table_rejected.style.bottom="0";GDPR_table_rejected.style.verticalAlign="middle"; /* some old IE convention *//* update link values 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";
}
 
/* end rotaing banner */

Navigation menu