PageSourceSearch

https://www.buehne-magazin.com/build/assets/embed-optin-7yga3Gwd.js

js buehne-magazin.com collected 2026-10-02 18:39:51 UTC 8,363 bytes, 5 lines download raw bytes

1class u{constructor(){this.libs={instagram:{url:"https://www.instagram.com/embed.js",isReady:()=>!!(window.instgrm&&window.instgrm.Embeds),onReady:t=>window.instgrm?.Embeds?.process?.(t||void 0)},pinterest:{url:"https://assets.pinterest.com/js/pinit.js",isReady:()=>!!window.PinUtils,onReady:t=>window.PinUtils?.build?.(t||void 0)},pinpoll:{url:"https://tools.pinpoll.com/global.js",isReady:()=>!!(window.Pinpoll||window.pinpoll),onReady:()=>{const t=window.Pinpoll||window.pinpoll;t?.build?t.build():t?.load&&t.load()}},x:{url:"https://platform.twitter.com/widgets.js",isReady:()=>!!(window.twttr&&window.twttr.widgets),onReady:t=>window.twttr?.widgets?.load?.(t||void 0)},riddle:{url:"https://www.riddle.com/embed/build-embedjs/embedV2.js",isReady:()=>!1,onReady:()=>{}}},this.loaded={},this._consentWatch={interval:null,observer:null,until:0,active:!1},this._globalFCObserver=null,this._tcData=null,this._tcfReady=!1,this._activateAllFrame=null,this._activateAllRunning=!1,this.vendorIds={instagram:null,pinterest:null,pinpoll:727,youtube:755,x:null,tiktok:null,riddle:null},Object.assign(this.vendorIds,window.EMBED_VENDOR_IDS||{})}isFCDialogOpen(){try{return!!(document.querySelector(".fc-dialog")||document.querySelector('.fc-consent-root [role="dialog"]')||document.querySelector(".fc-consent-root"))}catch{return!1}}hasMarketingConsent(){const t=window.googlefc;if(t?.getGoogleConsentModeValues&&t?.ConsentModePurposeStatusEnum){const e=t.getGoogleConsentModeValues(),i=t.ConsentModePurposeStatusEnum;return e.adStoragePurposeConsentStatus===i.CONSENT_MODE_PURPOSE_STATUS_GRANTED}return!1}getTCFData(t){return this._tcData?Promise.resolve(this._tcData):new Promise(e=>{try{if(typeof window.__tcfapi!="function")return e(null);window.__tcfapi("getTCData",2.2,(i,a)=>e(a?i:null),t)}catch{e(null)}})}vendorIdFromSection(t,e){const i=t?.dataset?.embedVendorId;return i?Number(i):this.vendorIds[e]??null}matchAddtlConsent(t,e){if(!t||typeof t!="string")return!1;const i=new RegExp(`~[^~]*\\.?${e}\\.?[^~]*~`);return!!t.match(i)}async hasVendorConsent(t,e){const i=this.vendorIdFromSection(e,t);if(!i)return null;const a=await this.getTCFData([i]);return a?(a.vendor?.consents||{})[i]===!0?!0:this.matchAddtlConsent(a.addtlConsent,i):!1}stopConsentWatch(){const t=this._consentWatch;t.interval&&(clearInterval(t.interval),t.interval=null),t.observer&&(t.observer.disconnect(),t.observer=null),t.active=!1}scheduleActivateAll(){this._activateAllFrame!==null||this._activateAllRunning||(this._activateAllFrame=window.requestAnimationFrame(async()=>{this._activateAllFrame=null,this._activateAllRunning=!0;try{await this.activateAll()}finally{this._activateAllRunning=!1}}))}startConsentWatch(t=8e3,e=300){const i=this._consentWatch;i.active&&this.stopConsentWatch(),i.until=Date.now()+t,i.active=!0,i.interval=setInterval(()=>{if(Date.now()>i.until){this.stopConsentWatch();return}this.scheduleActivateAll()},e),i.observer=new MutationObserver(()=>{this.scheduleActivateAll()}),i.observer.observe(document.documentElement,{childList:!0,subtree:!0})}setupFCDialogAutoWatch(){if(this._globalFCObserver)return;const t=()=>{this.isFCDialogOpen()&&!this._consentWatch.active?this.startConsentWatch(12e4,300):!this.isFCDialogOpen()&&this._consentWatch.active&&this.stopConsentWatch()};this._globalFCObserver=new MutationObserver(t),this._globalFCObserver.observe(document.documentElement,{childList:!0,subtree:!0}),setTimeout(t,0)}bindCMPEvents(){const t=window.googlefc=window.googlefc||{};t.callbackQueue=t.callbackQueue||[],t.callbackQueue.push({CONSENT_MODE_DATA_READY:()=>{this.scheduleActivateAll()},CONSENT_MODE_CHANGED:()=>{this.scheduleActivateAll()},TCF_V2_API_READY:()=>{this.scheduleActivateAll()},CONSENT_API_READY:()=>{try{if(typeof window.__tcfapi!="function")return;window.__tcfapi("addEventListener",2.2,(e,i)=>{i&&e&&(this._tcData=e,this._tcfReady=!0,this.scheduleActivateAll())})}catch{return}}})}openConsentDialog(){const t=window.googlefc=window.googlefc||{};t.callbackQueue=t.callbackQueue||[],t.callbackQueue.push(()=>{try{window.googlefc.showConsentMessage?window.googlefc.showConsentMessage():window.googlefc.showRevocationMessage()}catch{return}}),setTimeout(()=>{this._consentWatch.active||this.startConsentWatch(6e4,300)},250)}serviceFromSection(t){const e=t?.dataset?.embedService;return e==="instagram"||e==="pinterest"||e==="pinpoll"||e==="youtube"||e==="x"||e==="tiktok"||e==="riddle"?e:t.querySelector("blockquote.instagram-media")?"instagram":t.querySelector('[data-pin-do="embedPin"]')?"pinterest":t.querySelector("[data-pinpoll-id]")||t.querySelector('[data-mode="aipoll"]')?"pinpoll":t.querySelector("iframe[data-yt-src]")?"youtube":t.querySelector("blockquote.twitter-tweet")?"x":t.querySelector("iframe[data-tiktok-src]")?"tiktok":t.querySelector("[data-rid-id]")?"rid
1dle":"unknown"}bindNoticeButton(t){const e=t.querySelector('.social-embed__notice [data-action="open-consent"]');!e||e.dataset.consentBound==="1"||(e.addEventListener("click",()=>this.openConsentDialog()),e.dataset.consentBound="1")}setInactive(t,e){const i=t.querySelector(".social-embed__notice");e?(t.classList.add("is-inactive"),i&&i.removeAttribute("hidden")):(t.classList.remove("is-inactive"),i&&i.setAttribute("hidden",""))}clearNotice(t){this.setInactive(t,!1)}loadLibOnce(t){if(this.loaded[t])return this.loaded[t];const e=this.libs[t];return e?e.isReady()?(this.loaded[t]=Promise.resolve(),this.loaded[t]):(this.loaded[t]=new Promise((i,a)=>{const n=document.createElement("script");n.src=e.url,n.async=!0,n.onload=()=>i(),n.onerror=()=>a(new Error("failed to load "+t)),document.head.appendChild(n)}),this.loaded[t]):Promise.resolve()}parseTweetIdFromUrl(t){try{const e=String(t).match(/status\/(\d+)/);return e?e[1]:null}catch{return null}}async activateSection(t){const e=this.serviceFromSection(t);if(e==="unknown")return;const i=await this.hasVendorConsent(e,t);let a=i===!0;if(i===null&&(a=this.hasMarketingConsent()),!a){delete t.dataset.embedActivated,this.setInactive(t,!0);return}if(this.clearNotice(t),t.dataset.embedActivated!=="1"){if(e==="youtube"){const n=t.querySelector("iframe[data-yt-src]");n&&!n.src&&(n.src=n.dataset.ytSrc||""),t.dataset.embedActivated="1";return}if(e==="tiktok"){const n=t.querySelector("iframe[data-tiktok-src]");n&&!n.src&&(n.src=n.dataset.tiktokSrc||""),t.dataset.embedActivated="1";return}if(e==="x"){const n=t.querySelector("blockquote.twitter-tweet"),r=n?.dataset?.xSrc||"",d=this.parseTweetIdFromUrl(r);if(!d){this.setInactive(t,!0);return}await this.loadLibOnce("x").catch(l=>console.error("[embed]",l?.message||l));const s=n.parentElement||t,o=document.createElement("div");o.className="x-embed-holder",s.insertBefore(o,n),n.remove();try{window.twttr.widgets.createTweet(d,o,{align:"center",dnt:!0})}catch{return}t.dataset.embedActivated="1";return}if(e==="riddle"){const n=t.querySelector("[data-rid-id]"),r=encodeURIComponent(n?.dataset?.ridId);if(n&&r){await this.loadLibOnce("riddle");const d=`
2                    <iframe data-riddle-id="${r}"
3                        title="Riddle quiz embed"
4                        src="https://www.riddle.com/embed/a/${r}?lazyImages=false&staticHeight=false"
5                        allow="autoplay" referrerpolicy="strict-origin"></iframe>`;n.innerHTML=d,t.dataset.embedActivated="1",window.addEventListener("message",function(s){const o=n.querySelector("iframe[data-riddle-id]")?.contentWindow;if(o&&s.source===o&&s?.data?.isRiddle2Event&&s?.data?.type==="HeightChanged"&&s?.data?.riddleId===r){const l=s.data.height??500,c=document.querySelector(`iframe[data-riddle-id="${r}"]`);l&&c&&(c.style.height=l+"px")}});return}}await this.loadLibOnce(e).catch(n=>console.error("[embed]",n?.message||n)),t.dataset.embedActivated="1",setTimeout(()=>{const n=this.libs[e];try{n?.onReady?.(t)}catch{delete t.dataset.embedActivated;return}},0)}}async activateAll(){const t=Array.from(document.querySelectorAll("section.embed"));await Promise.all(t.map(e=>this.activateSection(e)))}showInactiveAll(){document.querySelectorAll("section.embed").forEach(e=>{this.bindNoticeButton(e),this.setInactive(e,!0)})}async initOnLoad(){this.setupFCDialogAutoWatch(),document.querySelectorAll("section.embed").forEach(t=>this.bindNoticeButton(t)),this.showInactiveAll(),this.bindCMPEvents(),await this.activateAll()}}const h=new u;window.addEventListener("load",()=>{h.initOnLoad()});

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.