=e))for(d=Math.floor(128*(1*d-p)/e),0>d&&(d=0),c=Math.ceil(128*(1*c-p)/e),127
Health – how to articles from wikiHow =g||g>b?(c&&(clearTimeout(c),c=null),d=f,a.apply()):c||(c=setTimeout(e,g))}}function p(){var a=!1,b=window.innerHeight||document.documentElement.clientHeight,c;for(c in g){var d=g[c];if(0!=d.useScrollLoader&&!d.isLoaded){a=d;var e=a.element.getBoundingClientRect(),f={top:e.top,bottom:e.bottom};0==a.lastTop-e.top&&window.scrollY!=a.lastY&&(f.top-=window.scrollY,f.bottom-=window.scrollY);a.lastTop=e.top;a.lastY=window.scrollY;a=f;e=b;f=52;var h=2*e;f-=h;e+=h;(0==a.top&&0==a.bottom?0:a.top>=f&&a.top=f&&a.bottom<=e||a.top=e)&&d.load();a=!0}}!a&&g.length&&(window.removeEventListener("scroll",k),k=null)}function u(a){if(a&&a.element)if(document.addEventListener&&a.finishedLoadingEvent){a.loaderRemoved=!1;var b=document.createElement("div");b.className="loader"; for(var c=0;3>c;c++){var d=document.createElement(“div”);d.className=”loader-dot”;b.appendChild(d)}var e=document.createElement(“div”);e.className=”loading-container”;e.appendChild(b);a.element.parentElement.insertAdjacentElement(“afterbegin”,e);a.element.addEventListener(a.finishedLoadingEvent,function(){a.alt&&(a.element.alt=a.alt);a.loadedCallback&&a.loadedCallback();0==a.loaderRemoved&&(this.parentElement.removeChild(e),a.loaderRemoved=!0,”undefined”!==typeof a.element.classList&&a.element.classList.remove(“img-loading-hide”))});a.errorEvent&&a.element.addEventListener(a.errorEvent,function(){a.alt&&(a.element.alt=a.alt)})}else a.alt&&(a.element.alt=a.alt),”undefined”!==typeof a.element.classList&&a.element.classList.remove(“img-loading-hide”)}function v(a){this.lastTop=a.getBoundingClientRect().top;this.lastY=window.scrollY;this.isVisible=this.isLoaded=!1;this.element=a;this.load=function(){}}function w(a){if(!a)return””;if(!l)return a;var b=a.split(“.”).pop();”jpg”!==b&&”png”!==b ||!a.match(/images(_[a-z]{2})?/thumb//)||a.match(/(.[a-zA-Z]+){2}$/)||(a+=”.webp”);return a}function I(a){v.call(this,a);this.src=a.getAttribute(“data-src”);this.load=function(){this.element.setAttribute(“src”,this.src);this.isLoaded=!0}}function A(a){v.call(this,a);this.alt=a.alt;a.alt=””;this.finishedLoadingEvent=”load”;this.errorEvent=”error”;if(x){var b=a.getAttribute(“data-srclarge”);null!=b&&(this.src=b)}this.src||(this.src=a.getAttribute(“data-src”));this.src=w(this.src);a&&void 0!==a.classList&&a.classList.add(“img-loading-hide”);this.load=function(){this.element.setAttribute(“src”,this.src);this.isLoaded=!0;u(this)}}function J(a){v.call(this,a);this.finishedLoadingEvent=”loadeddata”;this.isPlaying=!1;this.src=”https://www.wikihow.com/video”+this.element.getAttribute(“data-src”);this.poster=this.element.getAttribute(“data-poster”);(this.poster=w(this.poster))&&”jpg”==this.poster.split(“.”).pop()&&l&&(this.poster+=”.webp”);this.noAutoplay=this.element.getAttribute( “data-noautoplay”);this.play=function(){this.element.play();this.isPlaying=!0};this.pause=function(){this.element.pause();this.isPlaying=!1};this.load=function(){this.element.setAttribute(“poster”,this.poster);!B||this.noAutoplay||!x&&!0!==window.wgIsMainPage?this.finishedLoadingEvent=null:(this.element.setAttribute(“src”,this.src),this.play());this.isLoaded=!0;this.noAutoplay||u(this)}}function y(a){var b=document.getElementById(a);if(b)if(l||C){var c=null;a=null==h?!1:!0;if(“img”===b.nodeName.toLowerCase())if(c=new A(b),a)c.useScrollLoader=!1,h.observe(c.element);else{if(1==m){c.useScrollLoader=!1;var d=c;d.element.classList.remove(“img-loading-hide”);d.element.setAttribute(“loading”,”lazy”);d.load()}}else if(“video”===b.nodeName.toLowerCase())c=new J(b),a&&(c.useScrollLoader=!1,h.observe(c.element));else if(“iframe”===b.nodeName.toLowerCase())c=new I(b),a&&(c.useScrollLoader=!1,h.observe(c.element));else if(“picture”===b.nodeName.toLowerCase())if(d=b.getElementsByTagName(“img”)[0],1 ==m){q?(d.width=d.dataset.width,d.height=d.dataset.height):(d.width=d.dataset.widthlarge,d.height=d.dataset.heightlarge);d.src=d.dataset.src;d=b.getElementsByTagName(“source”);for(var e=0;e
Source


