window.addEventListener('message', function handleIFrameMessage (e) { var clinikoBookings = document.getElementById('cliniko-41033879'); if (typeof e.data !== 'string') return; if (e.data.search('cliniko-bookings-resize') > -1) { var height = Number(e.data.split(':')[1]); clinikoBookings.style.height = height + 50 + 'px'; } e.data.search('cliniko-bookings-page') > -1 && clinikoBookings.scrollIntoView(); });