15 Stock Market Investing News Websites That You Must Read

15 Stock Market Investing News Websites That You Must Read 0){ googlefont.forEach(function(src) { var load_css = document.createElement(“link”); load_css.rel = “stylesheet”; load_css.href = src; load_css.type = “text/css”; var godefer2 = document.getElementsByTagName(“link”)[0]; if(godefer2 == undefined){ document.getElementsByTagName(“head”)[0].appendChild(load_css); }else{ godefer2.parentNode.insertBefore(load_css, godefer2); } }); wnw_first_google_css = true; } } function load_all_js(){ if(wnw_first_js == false && lazy_load_js.length > 0){ load_intJS(); load_extJS(0); } if(mousemoveloadimg == false){ var top = this.scrollY; lazyloadimages(top); mousemoveloadimg = true; } } function load_innerJS(){ if(wnw_first_inner_js == false){ for(var key in lazyload_inner_js){ if(lazyload_inner_js[key] != “”){ var s = document.createElement(“script”); s.innerHTML =lazyload_inner_js[key]; document.getElementsByTagName(“body”)[0].appendChild(s); } } wnw_first_inner_js = true; } } var inner_js_counter = -1; var s={}; function load_extJS() { if(wnw_first_js){ return; } console.log(inner_js_counter,lazy_load_js.length,”js loop”); if(inner_js_counter+1 0){ page_is_scrolled = true; var s; internal_js.forEach(function(script) { s = document.createElement(“script”); s[“type”] = “text/javascript”; for(var key in script){ console.log(key); s.setAttribute(key, script[key]); } console.log(s); document.getElementsByTagName(“head”)[0].appendChild(s); }); s.onload=function(){ internal_js_loaded = true; }; wnw_int_first_js = true; } } var exclude_lazyload = null; var win_width = screen.availWidth; function load_extCss(){ if(wnw_first_css == false && lazy_load_css.length > 0){ lazy_load_css.forEach(function(src) { var load_css = document.createElement(“link”); load_css.rel = “stylesheet”; load_css.href = src; load_css.type = “text/css”; var godefer2 = document.getElementsByTagName(“link”)[0]; if(godefer2 == undefined){ document.getElementsByTagName(“head”)[0].appendChild(load_css); }else{ godefer2.parentNode.insertBefore(load_css, godefer2); } }); wnw_first_css = true; } } window.addEventListener(“scroll”, function(event){ var top = this.scrollY; lazyloadimages(top); lazyloadiframes(top); }); setInterval(function(){lazyloadiframes(top);},8000); setInterval(function(){lazyloadimages(0);},3000); function lazyload_img(imgs,bodyRect,window_height,win_width){ for (i = 0; i < imgs.length; i++) { if(imgs[i].getAttribute("data-class") == "LazyLoad"){ var elemRect = imgs[i].getBoundingClientRect(), offset = elemRect.top - bodyRect.top; if(elemRect.top != 0 && elemRect.top - window_height < 200 ){ /*console.log(imgs[i].getAttribute("data-src")+" -- "+elemRect.top+" -- "+window_height);*/ var src = imgs[i].getAttribute("data-src") ? imgs[i].getAttribute("data-src") : imgs[i].src ; var srcset = imgs[i].getAttribute("data-srcset") ? imgs[i].getAttribute("data-srcset") : ""; imgs[i].src = src; if(imgs[i].srcset != null & imgs[i].srcset != ""){ imgs[i].srcset = srcset; } delete imgs[i].dataset.class; imgs[i].setAttribute("data-done","Loaded"); } } } } function lazyload_video(imgs,top,window_height,win_width){ for (i = 0; i < imgs.length; i++) { var source = imgs[i].getElementsByTagName("source")[0]; if(typeof source != "undefined" && source.getAttribute("data-class") == "LazyLoad"){ var elemRect = imgs[i].getBoundingClientRect(); if(elemRect.top - window_height 0){ var src = source.getAttribute("data-src") ? source.getAttribute("data-src") : source.src ; var srcset = source.getAttribute("data-srcset") ? source.getAttribute("data-srcset") : ""; imgs[i].src = src; if(source.srcset != null & source.srcset != ""){ source.srcset = srcset; } delete source.dataset.class; source.setAttribute("data-done","Loaded"); } } } } function lazyloadimages(top){ var imgs = document.getElementsByTagName("img"); var ads = document.getElementsByClassName("lazyload-ads"); var sources = document.getElementsByTagName("video"); var bodyRect = document.body.getBoundingClientRect(); var window_height = window.innerHeight; var win_width = screen.availWidth; lazyload_img(imgs,bodyRect,window_height,win_width); lazyload_video(sources,top,window_height,win_width); } lazyloadimages(0); function lazyloadiframes(top){ var bodyRect = document.body.getBoundingClientRect(); var window_height = window.innerHeight; var win_width = screen.availWidth; var iframes = document.getElementsByTagName("iframe"); lazyload_img(iframes,bodyRect,window_height,win_width); }]]>

Related Post

Be the first to comment

Leave a Reply

Your email address will not be published.


*