PageSourceSearch

https://www.sunweb.nl/blog/wp-content/themes/sunweb-blog/dist/oembed-CV76E5kD.js

js sunweb.nl collected 2026-09-24 08:45:34 UTC 3,741 bytes, 1 lines download raw bytes

1class a{constructor(o){this.element=o,this.dataAttribute="data-oembed",this.classNames={consent:"js-consent-button",videoPlay:"btn--js-video-play",audioPlay:"btn--js-audio-play"},this.button=this.element.querySelector(`.${this.classNames.consent}`),this.source=this.element.dataset.source,this.type=this.element.dataset.type,this.disableNotice=this.element.dataset.disableNotice,this.cookiebotOpenerElement=null,this.cookiebotOpenerButton=null,this.initialize()}initialize(){if(this.disableNotice==="1"){this.showEmbed();return}typeof Cookiebot<"u"?this.initCookiebot():this.initDefault()}initCookiebot(){var o,t;(o=Cookiebot.consent)!=null&&o.marketing?this.showEmbed():(window.addEventListener("CookiebotOnAccept",()=>{var e,i;(e=Cookiebot.consent)!=null&&e.marketing?this.showEmbed():(i=this.cookiebotOpenerButton)==null||i.focus()}),window.addEventListener("CookiebotOnDecline",()=>{var e;(e=this.cookiebotOpenerButton)==null||e.focus()}),(t=this.button)==null||t.addEventListener("click",()=>{this.cookiebotOpenerButton=this.button,this.cookiebotOpenerElement=this.element,Cookiebot.show(),window.addEventListener("CookiebotOnDialogDisplay",()=>{const e=Cookiebot.dialog.DOM,i=e==null?void 0:e.querySelector("a,button,select,input,textarea");i==null||i.focus()})}))}initDefault(){var o;this.source&&window.localStorage.getItem(this.source)?this.showEmbed():((o=this.button)==null||o.addEventListener("click",()=>{if(this.cookiebotOpenerButton=this.button,this.cookiebotOpenerElement=this.element,this.source){window.localStorage.setItem(this.source,"true");const t=new CustomEvent("sourceAccepted",{bubbles:!0,detail:{source:()=>this.source}});document.dispatchEvent(t)}}),window.addEventListener("sourceAccepted",t=>{t.detail.source()===this.source&&this.showEmbed()}))}showEmbed(o){o===void 0&&(o=this.element);const t=o.querySelector("template");if(!t)return;const e=o.querySelector(`[${this.dataAttribute}="content"]`);if(e){if(this.source==="consent_embed_twitter"){const i="//platform.twitter.com/widgets.js";if(!document.querySelector(`script[src="${i}"]`)){const n=document.createElement("script");n.src=i,n.async=!0,document.body.appendChild(n)}}e.innerHTML=t.innerHTML,this.type==="video"?this.lazyLoadVideo(o):this.type==="audio"&&this.lazyLoadAudio(o),this.cookiebotOpenerButton=null,this.cookiebotOpenerElement=null}}lazyLoadVideo(o){var i;const t=o.querySelector(`[${this.dataAttribute}="video"]`);if(!t)return;const e=(i=this.cookiebotOpenerElement)==null?void 0:i.querySelector(`.${this.classNames.videoPlay}`);e==null||e.focus(),t.addEventListener("click",()=>{this.playVideo(t)})}lazyLoadAudio(o){var s,n;const t=o.querySelector(`[${this.dataAttribute}="audio"]`);if(!t)return;const e=(s=t==null?void 0:t.querySelector("iframe"))==null?void 0:s.getAttribute("title");if(e&&(e==null?void 0:e.length)>0){const r=t.querySelector(`[${this.dataAttribute}="audio-title"]`);if(!r)return;r.textContent=e}const i=(n=this.cookiebotOpenerElement)==null?void 0:n.querySelector(`.${this.classNames.audioPlay}`);i==null||i.focus(),t.addEventListener("click",()=>{this.playAudio(t)})}playVideo(o){const t=o.querySelector("iframe"),e=t==null?void 0:t.getAttribute("data-src");t==null||t.setAttribute("src",e+"&autoplay=1&disablekb=1&keyboard=0");const i=o.querySelector(`.${this.classNames.videoPlay}`),s=o.querySelector(`[${this.dataAttribute}="thumbnail"]`);i==null||i.remove(),s==null||s.remove()}playAudio(o){const t=o.querySelector("iframe"),e=t==null?void 0:t.getAttribute("data-src");if(!e||!t)return;t.allow="autoplay",t.setAttribute("src",e+"&auto_play=true&hide_related=true&show_comments=false&show_reposts=false");const i=o.querySelector(`[${this.dataAttribute}="placeholder"]`);i==null||i.remove()}}export{a as default};

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.