function resizePopup ( window ) { const innerHeight = window . document . body . offsetHeight ; try { window . resizeTo ( 350 , innerHeight + window . outerHeight - window . innerHeight + 10 ) ; } catch { } } let resizedAlready = false ; export default function resizeOncePerFrame ( window ) { if ( resizedAlready ) { return ; } resizedAlready = true ; requestAnimationFrame ( ( ) => setTimeout ( ( ) => ( resizedAlready = false ) , 0 ) ) ; resizePopup ( window ) ; }