2024-12-13 20:06:24 +01:00
|
|
|
((i,l)=>{l.querySelector&&i.addEventListener&&"undefined"!=typeof URL&&(i.wp=i.wp||{},i.wp.receiveEmbedMessage||(i.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!/[^a-zA-Z0-9]/.test(t.secret)){for(var r,s,a,n=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),o=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]'),c=new RegExp("^https?:$","i"),d=0;d<o.length;d++)o[d].style.display="none";for(d=0;d<n.length;d++)r=n[d],e.source===r.contentWindow&&(r.removeAttribute("style"),"height"===t.message?(1e3<(s=parseInt(t.value,10))?s=1e3:~~s<200&&(s=200),r.height=s):"link"===t.message&&(s=new URL(r.getAttribute("src")),a=new URL(t.value),c.test(a.protocol))&&a.host===s.host&&l.activeElement===r&&(i.top.location.href=t.value))}},i.addEventListener("message",i.wp.receiveEmbedMessage,!1),l.addEventListener("DOMContentLoaded",function(){for(var e,t,r=l.querySelectorAll("iframe.wp-embedded-content"),s=0;s<r.length;s++)(t=(e=r[s]).getAttribute("data-secret"))||(t=Math.random().toString(36).substring(2,12),e.src+="#?secret="+t,e.setAttribute("data-secret",t)),e.contentWindow.postMessage({message:"ready",secret:t},"*")},!1)))})(window,document);
|