-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.js
1 lines (1 loc) · 2.44 KB
/
build.js
1
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e){function n(t){return Array.from(document.querySelectorAll(t))}document.addEventListener("DOMContentLoaded",()=>{console.log("Loaded"),function(){if(window.location.host.startsWith("localhost"))return;n("button").forEach(t=>{t.addEventListener("click",()=>{console.log("Subscribe button click."),analytics.track("Home Page: Button Click",{id:t.getAttribute("data-track")||t.getAttribute("id")})})}),n("a").forEach(t=>{t.addEventListener("click",()=>{analytics.track("Home Page: Link Click",{id:t.getAttribute("data-track")||t.getAttribute("id"),href:t.getAttribute("href"),text:t.innerText})})})}(),function(){let t=!1,e=!1;document.fonts.ready.then(()=>{t=!0,o()});const n=document.querySelector("img.hero");n?n.complete&&0!==n.naturalWidth?(e=!0,o()):n.onload=()=>{e=!0,o()}:e=!0;function o(){t&&e&&document.body.classList.add("loaded")}setTimeout((function(){document.body.classList.add("loaded")}),1e3)}(),function(){const t=n(".iconText"),e=n(".screenshot");setInterval(()=>{const n=window.innerHeight||document.documentElement.clientHeight;for(let e=0;e<t.length;e++){if(t[e].classList.contains("iconTextSectionVisible"))continue;const o=t[e].getBoundingClientRect();o.top+o.height/1.5>=0&&o.top+o.height/1.5<=n&&t[e].classList.add("iconTextSectionVisible")}for(let t=0;t<e.length;t++){if(e[t].classList.contains("screenshotVisible"))continue;const o=e[t].getBoundingClientRect();o.top+o.height/1.5>=0&&o.top+o.height/1.5<=n&&(e[t].classList.add("screenshotVisible"),"A"===e[t].parentNode.tagName&&e[t].parentNode.classList.add("screenshotVisible"))}},100)}()})}]);