MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus biergärtenmünchen.de
K |
|||
Zeile 1: | Zeile 1: | ||
/* Das folgende JavaScript wird für alle Benutzer geladen. */ | /* Das folgende JavaScript wird für alle Benutzer geladen. */ | ||
+ | |||
+ | alert(document.location.href); | ||
var RecaptchaOptions = { | var RecaptchaOptions = { |
Version vom 5. April 2014, 06:41 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */ alert(document.location.href); var RecaptchaOptions = { theme : 'white' }; /* 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 */ var beergarden_banner_dir = '/images/beer/'; /* Upload only onto English version is the wgForeignFileRepos function will not fetch the images cross domain in the different (bier/beer) directories */ /* The arrays with images and their corresponding URLs */ var beergarden_banners = new Array("Image1.jpg", "Image2.jpg", "Image3.jpg", "Image4.jpg"); var beergarden_links = new Array("/Page1", "/Page2", "/Page3", "/Page4"); function start_animation(){ setTimeout('beergarden_blender()',15000); /* 15 second */ } beergarden_banner0 = new Image(147,85); beergarden_banner0.src = beergarden_banner_dir + "Banner1.jpg"; beergarden_banner1 = new Image(147,85); beergarden_banner1.src = beergarden_banner_dir + "Banner2.jpg"; beergarden_banner2 = new Image(147,85); beergarden_banner2.src = beergarden_banner_dir +"Banner3.jpg"; beergarden_banner3 = new Image(147,85); beergarden_banner3.src = beergarden_banner_dir +"Banner4.jpg"; function beergarden_swap(){ opacity = 0; IE_opacity = 0; if (navigator.appVersion.indexOf("MSIE") != -1){ document.getElementById("blendinger").style.filter = "alpha(opacity=0)"; interval = setInterval("blendinger_IE()",50) } else { document.getElementById("blendinger").style.opacity=0; interval = setInterval("blendinger_opacity()",50) } } function blendinger_IE(){ if (IE_opacity < 100){ IE_opacity = IE_opacity +4; document.getElementById("blendinger").style.filter = "alpha(opacity="+IE_opacity+")"; } else{ clearInterval(interval); IE_count = 0; } } function blendinger_opacity(){ if (opacity < 1){ opacity = (Math.floor(opacity * 100) +4) / 100; document.getElementById("blendinger").style.opacity=opacity; } else{ clearInterval(interval); } } var beergarden_array_index = beergarden_links.length -1; var first_beergarden_index = Math.round(beergarden_array_index * Math.random()) var beergarden_cycle = first_beergarden_index; var beergarden_total = beergarden_banners.length -1; var beergarden_link = beergarden_links[beergarden_cycle]; /* initially the first */ function beergarden_blender(){ /* first set current image as background */ document.getElementById('background_image').style.backgroundImage='url('+beergarden_banner_dir+beergarden_banners[beergarden_cycle]+')'; beergarden_cycle++; if (beergarden_cycle == beergarden_banners.length){ beergarden_cycle = 0; } beergarden_swap(); setTimeout("document.images.beergarden_animation.src=beergarden_banner_dir + beergarden_banners[beergarden_cycle];",10) beergarden_link = beergarden_links[beergarden_cycle] /* update link values */ } /* end rotaing banner */