HEX
Server: Apache
System: Linux 162-240-236-42.bluehost.com 3.10.0-1160.114.2.el7.x86_64 #1 SMP Wed Mar 20 15:54:52 UTC 2024 x86_64
User: bt667 (1004)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /home/bt667/public_html/wp-content/plugins/embed-optimizer/detect.min.js
export const name="Embed Optimizer";const loadedElementContentRects=new Map;export async function initialize({log:e}){const t=e||console.log,n=document.querySelectorAll(".wp-block-embed > .wp-block-embed__wrapper[data-od-xpath]");for(const e of n)monitorEmbedWrapperForResizes(e,t);t("Loaded embed content rects:",loadedElementContentRects)}export async function finalize({log:e,error:t,getElementData:n,extendElementData:o}){const r=e||console.log,d=t||console.error;for(const[e,t]of loadedElementContentRects.entries())try{o(e,{resizedBoundingClientRect:t}),r(`boundingClientRect for ${e} resized:`,n(e).boundingClientRect,"=>",t)}catch(n){d(`Failed to extend element data for ${e} with resizedBoundingClientRect:`,t,n)}}function monitorEmbedWrapperForResizes(e,t){if(!("odXpath"in e.dataset))throw new Error("Embed wrapper missing data-od-xpath attribute.");const n=e.dataset.odXpath;new ResizeObserver((e=>{const[o]=e;loadedElementContentRects.set(n,o.contentRect),t(`Resized element ${n}:`,o.contentRect)})).observe(e,{box:"content-box"})}