The Magic Paintbrush

var btiWidget=document.getElementById(“btiWidget”);function setBTIWidgetHeight(t){t!=btiWidget.getAttribute(“height”)&&btiWidget.setAttribute(“height”,t+”px”)}function handleDocHeightMsg(t){if(“https://bookthatin.com”===t.origin){var e=JSON.parse(t.data);e.docHeight&&setBTIWidgetHeight(e.docHeight),e.btiWidgetScrollTop&&btiWidget.scrollIntoView()}}window.addEventListener?window.addEventListener(“message”,handleDocHeightMsg,!1):window.attachEvent&&window.attachEvent(“onmessage”,handleDocHeightMsg);
Advertisement
%d bloggers like this: