AMPERION_Webpage/static/tarteaucitron/tarteaucitron.min.js

1 line
82 KiB
JavaScript
Raw Normal View History

2025-09-02 10:03:20 +02:00
var tarteaucitronScriptsDiscover=document.getElementsByTagName("script"),tarteaucitronCurrentScript=document.currentScript instanceof HTMLScriptElement?document.currentScript:tarteaucitronScriptsDiscover[tarteaucitronScriptsDiscover.length-1],tarteaucitronPath=tarteaucitronCurrentScript.src.split("?")[0],tarteaucitronForceCDN=tarteaucitronForceCDN===undefined?"":tarteaucitronForceCDN,tarteaucitronUseMin=tarteaucitronUseMin===undefined?"":tarteaucitronUseMin,cdn=tarteaucitronForceCDN===""?tarteaucitronPath.split("/").slice(0,-1).join("/")+"/":tarteaucitronForceCDN,alreadyLaunch=alreadyLaunch===undefined?0:alreadyLaunch,tarteaucitronForceLanguage=tarteaucitronForceLanguage===undefined?"":tarteaucitronForceLanguage,tarteaucitronForceExpire=tarteaucitronForceExpire===undefined?"":tarteaucitronForceExpire,tarteaucitronCustomText=tarteaucitronCustomText===undefined?"":tarteaucitronCustomText,tarteaucitronExpireInDay=tarteaucitronExpireInDay===undefined||typeof tarteaucitronExpireInDay!=="boolean"?true:tarteaucitronExpireInDay,timeExpire=31536e6,tarteaucitronProLoadServices,tarteaucitronNoAdBlocker=false,tarteaucitronIsLoaded=false;var tarteaucitron={version:"1.24.0",cdn:cdn,user:{},lang:{},services:{},added:[],idprocessed:[],state:{},launch:[],parameters:{},isAjax:false,reloadThePage:false,events:{init:function(){},load:function(){}},init:function(params){"use strict";var origOpen;tarteaucitron.parameters=params;if(alreadyLaunch===0){alreadyLaunch=1;if(window.addEventListener){if(document.readyState==="complete"){tarteaucitron.initEvents.loadEvent(false)}else{window.addEventListener("load",function(){tarteaucitron.initEvents.loadEvent(false)},false)}window.addEventListener("scroll",function(){tarteaucitron.initEvents.scrollEvent()},false);window.addEventListener("keydown",function(evt){tarteaucitron.initEvents.keydownEvent(false,evt)},false);window.addEventListener("hashchange",function(){tarteaucitron.initEvents.hashchangeEvent()},false);window.addEventListener("resize",function(){tarteaucitron.initEvents.resizeEvent()},false)}else{if(document.readyState==="complete"){tarteaucitron.initEvents.loadEvent(true)}else{window.attachEvent("onload",function(){tarteaucitron.initEvents.loadEvent(true)})}window.attachEvent("onscroll",function(){tarteaucitron.initEvents.scrollEvent()});window.attachEvent("onkeydown",function(evt){tarteaucitron.initEvents.keydownEvent(true,evt)});window.attachEvent("onhashchange",function(){tarteaucitron.initEvents.hashchangeEvent()});window.attachEvent("onresize",function(){tarteaucitron.initEvents.resizeEvent()})}if(typeof XMLHttpRequest!=="undefined"){origOpen=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){if(window.addEventListener){this.addEventListener("load",function(){if(typeof tarteaucitronProLoadServices==="function"){tarteaucitronProLoadServices()}},false)}else if(typeof this.attachEvent!=="undefined"){this.attachEvent("onload",function(){if(typeof tarteaucitronProLoadServices==="function"){tarteaucitronProLoadServices()}})}else{if(typeof tarteaucitronProLoadServices==="function"){setTimeout(tarteaucitronProLoadServices,1e3)}}try{origOpen.apply(this,arguments)}catch(err){}}}}if(tarteaucitron.events.init){tarteaucitron.events.init()}},initEvents:{loadEvent:function(isOldBrowser){tarteaucitron.load();tarteaucitron.fallback(["tarteaucitronOpenPanel"],function(elem){if(isOldBrowser){elem.attachEvent("onclick",function(event){tarteaucitron.userInterface.openPanel();event.preventDefault()})}else{elem.addEventListener("click",function(event){tarteaucitron.userInterface.openPanel();event.preventDefault()},false)}},true)},keydownEvent:function(isOldBrowser,evt){if(evt.keyCode===27){tarteaucitron.userInterface.closePanel()}if(isOldBrowser){if(evt.keyCode===9&&focusableEls.indexOf(evt.target)>=0){if(evt.shiftKey){if(document.activeElement===firstFocusableEl){lastFocusableEl.focus();evt.preventDefault()}}else{if(document.activeElement===lastFocusableEl){firstFocusableEl.focus();evt.preventDefault()}}}}},hashchangeEvent:function(){if(document.location.hash===tarteaucitron.hashtag&&t