forked from Prebid-Vertoz/vrtzjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadPosition.min.js
1 lines (1 loc) · 1.68 KB
/
adPosition.min.js
1
function onScreen(t,e){var _=window.vOb.V_h/2/2,o=DOb.ht-_;return e.B_f<=t.V_b&&e.F_t>=t.V_t?pos=e.F_t>=t.V_t&&e.B_f<_?"1":e.F_t>=t.V_t&&e.R_f<=lS&&e.L_f>=t.V_t||e.F_t>=t.V_t&&e.L_f>rS&&e.R_f<t.V_w?"6":"1":e.F_t>=t.V_b?pos=e.R_f<=lS&&e.L_f>=t.V_t||e.L_f>=rS&&e.R_f<DOb.wt?"6":(e.B_f<=o||e.F_t,"3"):(buf=.5*adHeight,pV=t.V_b-buf>=e.F_t&&e.B_f-buf>t.V_t,pos=pV?e.F_t>=t.V_t&&e.R_f<=lS&&e.L_f>=t.V_t||e.F_t>=t.V_t&&e.L_f>=rS&&window.aOb.R_f<=t.V_w?"6":"1":e.R_f<=lS&&e.L_f>=t.V_t||e.L_f>=rS&&e.R_f<=t.V_w?"6":"3")}var p=0,eP="",isInsideIframe=!1,pos=0,buf,pV,t_of_p;try{aOb={},vOb={},DOb={};var par=(eP=document.currentScript||function(){var t=document.getElementsByTagName("script");return t[t.length-1]}()).parentNode;t_of_p=eP.parentNode.nodeName;var adW=eP.getAttribute("adw"),adH=eP.getAttribute("adh");if("HEAD"==t_of_p)p="1";else{var bd=window.top.document.body,h=window.top.document.documentElement;if(DOb.top=window.top.screenY,DOb.wt=window.outerWidth,DOb.ht=Math.max(bd.scrollHeight,bd.offsetHeight,bd.getBoundingClientRect().height,h.clientHeight,h.scrollHeight,h.offsetHeight),vOb.V_t=window.top.pageYOffset,vOb.V_h=window.top.innerHeight,vOb.V_w=window.top.innerWidth,vOb.V_b=vOb.V_t+vOb.V_h,"IFRAME"==t_of_p)console.log("IFRAME"),aOb.F_t=frameElement.offsetTop,aOb.L_f=frameElement.offsetLeft;else{var wrp=document.createElement("div");par.replaceChild(wrp,eP),wrp.appendChild(eP);var s_prt=eP.parentNode;aOb.L_f=s_prt.getBoundingClientRect().left-window.scrollX,aOb.F_t=s_prt.getBoundingClientRect().top-window.scrollY}aOb.R_f=aOb.L_f+adW,aOb.B_f=aOb.F_t+adH;var horzCenter=vOb.V_w/2,lS=horzCenter/2,rS=vOb.V_w-lS;onScreen(vOb,aOb),p=pos}console.log("pos"+p)}catch(t){console.log("err")}var position={x:p};