PageSourceSearch

https://www.daka.tirol/templates/daka.tirol/js/fw-youtube.js?cb=1718714083

js daka.tirol collected 2026-10-05 00:47:06 UTC 5,528 bytes, 2 lines download raw bytes

1var e=Object.defineProperty,t=(t,n,i)=>((t,n,i)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i)(t,"symbol"!=typeof n?n+"":n,i);class n extends HTMLElement{constructor(){super(),t(this,"videoId"),t(this,"videoPoster"),t(this,"openInFancybox"),t(this,"playerInstance"),t(this,"klaroManager")}connectedCallback(){this.videoId=this.getAttribute("video-id"),this.videoPoster=this.getAttribute("video-poster"),this.openInFancybox="true"===this.getAttribute("open-in-fancybox"),this.klaroManager=window.klaro&&window.klaro.getManager(),this.render(),this.addEventListeners()}render(){this.innerHTML=`\n            <button>${this.videoPoster?this.createPlaceholder(this.videoId,this.videoPoster):this.createPlaceholder(this.videoId,!1)}</button>\n        `}async postRender(){const e=this.querySelector(".fw-youtube-player-placeholder img");e.complete||(e.addEventListener("load",(()=>{e.complete||this.replaceThumbnail(e)})),e.addEventListener("error",(()=>{this.replaceThumbnail(e)})))}createPlaceholder(e,t){return`\n            <div class="fw-youtube-player-placeholder">\n                <img src="${t||`/includes/futureweb/imageWrapperExt.php?file=https://img.youtube.com/vi/${e}/maxresdefault.jpg&originalDimension=1`}" alt="Video Poster">\n                <div class="fw-youtube-player-placeholder-play"></div>\n            </div>\n        `}addEventListeners(){this.querySelector("button").addEventListener("click",(()=>{this.onButtonClick()})),document.addEventListener("DOMContentLoaded",(()=>{this.postRender()}))}onButtonClick(){const e=this.klaroManager&&this.klaroManager.getConsent("youtube")&&this.klaroManager.confirmed;this.openInFancybox?e?this.createFancybox():this.createPopup({fancybox:!0}):e?this.createIframe():this.createPopup({fancybox:!1})}createPopup(e){const t={de:{title:"Zustimmung erforderlich",text:"Damit Sie dieses Video ansehen können, müssen Sie der<br />Verwendung von <b>Youtube</b> zustimmen.",accept:"Zustimmen",decline:"Ablehnen"},en:{title:"Permission required",text:"This website uses <b>Youtube</b> to provide video contents.<br/> If you want to continue, you have to allow the usage otherwise we are unable to provide the contents of this video.",accept:"Accept",decline:"Decline"}},n=document.documentElement.lang.toLowerCase(),i=-1!==Object.keys(t).indexOf(n)?n:"en",o=document.querySelector("#klaro .klaro");o||(document.createElement("div"),o.className="klaro"),o.innerHTML=`\n            <div class="cookie-modal">\n                <div class="cm-bg"></div>\n                <div class="cm-modal cm-klaro">\n                    <div class="cm-header">\n                        <h1 class="title"><span>${t[i].title}</span></h1>\n                        <p>${t[i].text}</p>\n                    </div>\n                    <div class="cm-footer">\n                        <div class="cm-footer-buttons">\n                            <button class="cm-btn cm-btn-decline" type="button">${t[i].decline}</button>\n                            <button class="cm-btn cm-btn-success" type="button">${t[i].accept}</button>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        `;const a=o.querySelector(".cm-btn.cm-btn-success"),r=o.querySelector(".cm-btn.cm-btn-decline");a.addEventListener("click",(()=>{e.fancybox?this.createFancybox():this.createIframe(),this.klaroManager.updateConsent("youtube",!0),this.klaroManager.saveAndApplyConsents(),this.destroyPopup()})),r.addEventListener("click",(()=>{this.klaroManager.updateConsent("youtube",!1),this.klaroManager.saveAndApplyConsents(),this.destroyPopup()}))}destroyPopup(){document.querySelector("#klaro .klaro").innerHTML=""}createIframe(){this.loadScriptByURL("ytiframeapi","https://www.youtube.com/iframe_api",(()=>{window.YT.ready((()=>{const e=document.createElement("div"),t=this.querySelector("button");this.replaceChild(e,t);const n=new window.YT.Player(e,{height:"360",width:"640",videoId:this.videoId,playerVars:{autoplay:1,playsinline:0},events:{onReady:e=>{this.playerInstance=n,this.classList.remove("loading"),this.classList.add("player-ready");var t=new Event("player.ready");this.dispatchEvent(t),e.target.playVideo()}}})}))}))}createFancybox(){window.Fancybox.show([{src:`https://www.youtube.com/watch?v=${this.videoId}?autoplay=1`,type:"video",id:"fw-youtube-popup",ratio:16/9,videoAutoplay:!0}])}loadScriptByURL(e,t,n){const i=document.getElementById(e);if(!i){var o=document.createElement("script");o.type="text/javascript",o.src=t,o.id=e,o.onload=function(){n&&n()},document.body.appendChild(o)}i&&n&&n()}async replaceThumbnail(e){const t=await this.getYtThumbnailUrl(this.videoId);e.src=t}getYtThumbnailUrl(e){return[`/includes/futureweb/imageWrapperExt.php?file=https://img.youtube.com/vi/${e}/maxresdefault.jpg&originalDimension=1`,`/includes/futureweb/imageWrapperExt.php?file=https://img.youtube.com/vi/${e}/hqdefault.jpg&originalDimension=1`,`/includes/futureweb/imageWrapperExt.php?file=https://img.youtube.com/vi/${e}/mqdefault.jpg&originalDimension=1`,`/includes/futureweb/imageWrapperExt.php?file=https://img.youtube.com/vi/${e}/sddefault.jpg&originalDimension=1`,`/includes/futureweb/imageWrapperExt.php?file=https://img.youtube.com/vi/${e}/default.jpg&originalDimension=1`].reduce(((e,t)=>e.catch((()=>{return e=t,new Promise(((t,n)=>{const i=new Image;i.src=e,i.onload=()=>t(e),i.onerror=()=>n()}));var e}))),Promise.reject())}}customElements.define("fw-youtube-player",n);
2//# sourceMappingURL=fw-cms-shared.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.