Y && ++attempts < max) {
    setTimeout(sendCoordinates, 10);
    return;
  }
  if (should_wait_until_settled) {
    should_wait_until_settled = false;
    setTimeout(sendCoordinates, 300);
    return;
  }
  prefixedMessage.postToOpener({
    left: window.screenX,
    top: window.screenY,
    width: window.innerWidth,
    height: window.innerHeight
  });
}
window.addEventListener('load', sendCoordinates);
</script>
