<iframe id="gb" src="/lib/cgi-bin/gb.pl" scrolling="no"></iframe>

<script>
	window.addEventListener('message', (evt) => {
		if(evt.data.type && evt.data.type === 'resize-iframe')
		{
			var iframe = document.getElementById('gb');
			iframe.height = evt.data.payload.height;
		}
		else if(evt.data.type && evt.data.type === 'scroll-page')
		{
			window.scrollTo(0, 0);
		}
	}, false);
</script>
