PageSourceSearch

https://www.slashgear.com/wp-content/themes/unified/js/loopgal.min.js?v=1779202506

js slashgear.com collected 2026-10-01 07:33:06 UTC 37,238 bytes, 1 lines download raw bytes

1function LoopEs(e){this.wTop=!1,this.wBottom=!1,this.wHeight=!1,this.device="desktop",this.rnothtmlwhite=/[^\x20\t\r\n\f]+/g,this.rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,this.allowTrailingID=!1,this.allowFullUrlForID=!1,this.lastID=null,this.lastURL=null,this.referrer="",this.viewType="entrance",this.updateW(),this.isVisible("#is-tablet")&&(this.device="tablet"),this.isVisible("#is-mobile")&&(this.device="mobile"),this.updateViewType(!1),void 0!==e&&!e||(document.addEventListener("copy",this.copyHandle),document.getElementById("hamburger-holder").addEventListener("click",this.hamburgerHelper.bind(this)),document.getElementById("bg").addEventListener("click",this.hamburgerClose.bind(this)),document.querySelector(".nav-opener.close").addEventListener("click",this.hamburgerClose.bind(this)))}function LoopGal(e){LoopEs.call(this),this.articleNum=0,this.currentSlide=0,this.lastScroll=0,this.lastScrollTime=0,this.articleTime=this.lastScrollCall=(new Date).getTime(),this.scrollTimeout=!1,this.callingNextArticle=!1,this.postID=this.getArticleID(document.location.href),this.lastArticle=this.postID,this.seenArticles={},this.gaInfArticles={},this.engagedArticles={},this.loadNextArticleCallback=!1,this.fromZerg=!1,this.fromFacebook=!1,this.disqusDomain=!1,this.openWebID=!1,this.refreshInterval=!1,this.adIntervalTimeout=!1,this.allowLiveblog=!1,this.liveblogRefreshInterval=15,this.liveblogIntervalTimeout=!1,this.scrolledArticles={},this.v3UI=!1,this.newGTM=!1,this.secondLoad=!1,this.keepScroll=!1,this.doHeaderHide=!1,this.moveWhatToWatch=!1,this.ajaxSidebar=!1,this.ajaxSidebarURL="",this.slideTracked50={},this.slideTracked100={},e&&void 0!==e.ajaxSidebar&&(this.ajaxSidebar=e.ajaxSidebar),e&&void 0!==e.ajaxSidebarURL&&e.ajaxSidebarURL.match(/^\//)&&(this.ajaxSidebarURL=e.ajaxSidebarURL),this.seenArticles[this.postID]=1,this.refreshInterval||(this.adTimeout=setTimeout(this.refreshLock.bind(this),15e3)),window.addEventListener("scroll",this.scrollHandle.bind(this)),window.addEventListener("resize",this.updateW.bind(this)),window.addEventListener("orientationchange",this.updateW.bind(this)),document.body.addEventListener("click",this.checkClick.bind(this)),this.isDev=!1,document.location.search&&0<document.location.search.indexOf("loopdev=1")&&(this.isDev=!0),this.scrollHandle(!0),e&&"function"==typeof e.ready&&e.ready.call(this),e&&void 0!==e.fromFacebook&&(this.fromFacebook=!0),e&&void 0!==e.fromZerg&&(this.fromZerg=!0),e&&void 0!==e.allowTrailingID&&(this.allowTrailingID=!0),e&&void 0!==e.allowFullUrlForID&&(this.allowFullUrlForID=!0),e&&void 0!==e.doHeaderHide&&(this.doHeaderHide=!0),e&&void 0!==e.refreshInterval&&(this.refreshInterval=e.refreshInterval),e&&void 0!==e.v3UI&&(this.v3UI=e.v3UI),e&&void 0!==e.newGTM&&(this.newGTM=e.newGTM),e&&void 0!==e.moveWhatToWatch&&(this.moveWhatToWatch=e.moveWhatToWatch),this.refreshInterval&&this.refreshInterval<15&&(this.refreshInterval=15),this.refreshInterval&&(this.adTimeout=!0,this.adIntervalTimeout=setInterval(this.refreshAdsOnInterval.bind(this),1e3*this.refreshInterval));for(var t=document.querySelectorAll("img.slashfilmimportimage"),i=0;i<t.length;i++)t[i].addEventListener("error",this.fixImport.bind(this));if(this.attachToRecipe(),this.attachToCode(),this.attachSliderListeners(),this.moveWhatToWatch&&"desktop"!=this.device){let e=document.querySelector(".under-art"),t=document.getElementById("ajax-sidebar");e&&t&&(t.parentNode.removeChild(t),e.parentNode.insertBefore(t,e))}if(this.ajaxSidebar&&this.ajaxSidebarURL){let i=!0;if(this.moveWhatToWatch){let e=document.getElementById("what-to-watch-widget-container");if(e){var o=e.getAttribute("data-key");if(o){var a=(new Date).toLocaleString("en-US",{timeZone:"America/New_York"});let e=new Date(a);var r=e.getHours(),a=new Date;let t=(a=r<7?new Date(Date.now()-864e5):a).toLocaleString("en-CA",{timeZone:"America/New_York"});o==t.split(",")[0]&&(i=!1)}}}i&&this.updateAjaxSidebar()}e&&void 0!==e.disqusDomain&&(this.disqusDomain=e.disqusDomain,this.initDisqus()),e&&void 0!==e.openWebID&&(this.openWebID=e.openWebID,this.initOpenWeb()),e&&void 0!==e.allowLiveblog&&(this.allowLiveblog=!0,this.attachLiveblog()),history.pushState(LooperConfig.ga4data,"",document.location)}LoopEs.prototype.updateW=function(){return this.wTop=window.scrollY||window.pageYOffset,this.wBottom=this.wTop+window.innerHeight,this.wHeight=Math.min(window.innerHeight,window.visualVie
1wport.height),this.wWidth=Math.min(window.innerWidth,window.visualViewport.width),!0},LoopEs.prototype.isInView=function(e,t){var i,o,a,r,s,n,l,d;return t=t||0,"function"==typeof e.getBoundingClientRect?(r=0<=(l=e.getBoundingClientRect()).top&&l.top-t<this.wHeight,s=0<l.bottom&&l.bottom-t<=this.wHeight,o=(i=r)&&s,a=l.bottom<0,d=Math.max(0,l.left),n=Math.max(0,l.top),r=Math.min(window.innerWidth,l.right),s=Math.min(window.innerHeight,l.bottom),l=(l.right-l.left)*(l.bottom-l.top),r=Math.round(100*Math.max(0,(r-d)*(s-n)/l))):(d=window.getComputedStyle(e),s=this.wBottom,n=parseInt(d.height),i=(l=parseInt(d.offsetTop-t))>=this.wTop,o=(e=l+n)<=s&&l>=this.wTop,a=e+t<=this.wTop,t=d.offsetTop-this.wTop,d=d.offsetTop+n-this.wBottom,0<t&&t<n?r=Math.max(0,t/n*100):0<d&&d<n&&(r=Math.max(0,d/n*100))),{partial:i,full:o,past:a,pct:r}},LoopEs.prototype.isVisible=function(e,t){if(!(e="string"==typeof e?document.querySelector(e):e))return!1;t=t||0;t=window.getComputedStyle(e);if("none"==t.display)return!1;e=parseInt(t.height),t=parseInt(t.width);return!(!e&&!t)},LoopEs.prototype.getCount=function(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&i++;return i},LoopEs.prototype.ajax=function(e,t,i,o,a){if(e){t=t||"GET",e=e.replace(/#.*/,"");var r="application/json; charset=utf-8";if(void 0!==(a=void 0===a?{}:a).contentType&&(r=a.contentType),"GET"==t&&"object"==typeof o){var s,n="";for(s in o)o.hasOwnProperty(s)&&null!==o[s]&&void 0!==o[s]&&(n&&(n+="&"),n+=s+"="+encodeURIComponent(o[s]));n&&(-1===e.indexOf("?")?e+="?"+n:e+="&"+n),o=!1}else"GET"==t&&o&&(-1===e.indexOf("?")?e+="?"+o:e+="&"+o,o=!1);var l=new XMLHttpRequest;l.open(t,e,!0),l.setRequestHeader("Content-type",r),void 0!==a.withCredentials&&(l.withCredentials=!0),l.onreadystatechange=function(e){if(4==l.readyState&&200==l.status)try{i.call(null,JSON.parse(l.responseText))}catch(e){i.call(null,l.responseText)}},"object"==typeof o?l.send(JSON.stringify(o)):o?l.send(o):l.send()}},LoopEs.prototype.closest=function(e,t){for(var i=!1,o=e;"function"==typeof(o=void 0!==o.parentNode&&o.parentNode?o.parentNode:document.body).matches?i=o.matches(t):"function"===o.matchesSelector?i=o.matchesSelector(t):!this.hasClass(e,t)&&"-1"===e.tagName.toUpperCase().indexOf(t.toUpperCase())||(i=!0),!i&&"BODY"!=o.tagName;);return!!i&&o},LoopEs.prototype.hasClass=function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},LoopEs.prototype.addClass=function(e,t){e.classList?e.classList.add(t):hasClass(e,t)||(e.className+=" "+t)},LoopEs.prototype.removeClass=function(e,t){e.classList?e.classList.remove(t):hasClass(e,t)&&(t=new RegExp("(\\s|^)"+t+"(\\s|$)"),e.className=e.className.replace(t," "))},LoopEs.prototype.stripAndCollapse=function(e){return(e.match(this.rnothtmlwhite)||[]).join(" ")},LoopEs.prototype.copyHandle=function(e){e.preventDefault();var t=document.location.href;-1!==t.indexOf("?")&&(t=t.replace(/\?.*/g,""));var i=window.getSelection();8<=i.toString().split(" ").length&&(i+="\n\nRead More: "+t),void 0!==window.clipboardData?window.clipboardData.setData("Text",i):void 0!==e.clipboardData&&e.clipboardData.setData("Text",i)},LoopEs.prototype.hamburgerHelper=function(){this.addClass(document.body,"nav-active")},LoopEs.prototype.hamburgerClose=function(){this.removeClass(document.body,"nav-active")},LoopEs.prototype.getArticleID=function(e){var t=e.match(/.*\/([0-9]+)\/.*/);return this.allowFullUrlForID?e:(t&&1<t.length||!!(this.allowTrailingID&&(t=e.match(/.*-[0-9]{2}([0-9]+)\/.*/))&&t&&1<t.length))&&t[1]},LoopEs.prototype.updateViewType=function(t,e){if(t)this.lastID=t,this.viewType="infinite",this.lastURL=e;else{t=document.referrer;if(t){this.lastURL=t;e=document.location.hostname.replace(/^www\./,"");if(new URL(t).hostname.replace(/^www\./,"")===e){this.viewType="referred_internal";let e=this.getArticleID(t);!e||e.match(/\.com\/$/)||e.match(/\.com\/(about|category|author)\//)||(this.lastID=e)}}}},LoopEs.prototype.updateAjaxSidebar=function(){var t,i;void 0!==this.ajaxSidebar&&this.ajaxSidebar&&(void 0===this.ajaxSidebarURL||!this.ajaxSidebarURL||(t=document.getElementById("ajax-sidebar"))&&((i=document.createElement("DIV")).className="overlay",i.innerHTML='<svg class="loading-spinner" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="40px" height="40px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve"><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"><animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indef
1inite"/></path></svg>',requestAnimationFrame(function(){t.appendChild(i)}),this.ajax(this.ajaxSidebarURL,"GET",function(e){e||t.removeChild(i),t.innerHTML=e})))},LoopGal.prototype=Object.create(LoopEs.prototype),Object.defineProperty(LoopGal.prototype,"constructor",{articleNum:0,lastScroll:0}),LoopGal.prototype.checkClick=function(a){if(this.hasClass(a.target,"carousel-button")){a.preventDefault(),a.stopImmediatePropagation();let o=this.closest(a.target,".carousel");var r=o.offsetLeft;if(o){let t=!1,i=o.querySelector(".carousel-slides");var s=parseInt(o.getAttribute("data-active-index"));let e=o.querySelector(".carousel-next-button");if(this.hasClass(a.target,"inactive"))return!1;if(this.hasClass(a.target,"carousel-next-button")||this.hasClass(a.target,"carousel-next"))t=i.querySelector(".carousel-slide:nth-of-type("+Math.abs(s+1)+")");else if(this.hasClass(a.target,"carousel-back-button")||this.hasClass(a.target,"carousel-back"))t=i.querySelector(".carousel-slide:nth-of-type("+Math.abs(s-1)+")"),s-1<=1&&this.addClass(o.querySelector(".carousel-back-button"),"inactive"),this.removeClass(o.querySelector(".carousel-next-button"),"inactive");else if(i){let e=new URL(a.target.href);t=document.getElementById(e.hash.substr(1))}if(t){s=Array.prototype.indexOf.call(i.children,t),a=s+1;if(e&&"object"==typeof e&&e.checkVisibility()){0===s?(this.addClass(o.querySelector(".carousel-back-button"),"inactive"),this.removeClass(o.querySelector(".carousel-next-button"),"inactive")):s+1>=i.children.length?(this.addClass(o.querySelector(".carousel-next-button"),"inactive"),this.removeClass(o.querySelector(".carousel-back-button"),"inactive")):(this.removeClass(o.querySelector(".carousel-back-button"),"inactive"),this.removeClass(o.querySelector(".carousel-next-button"),"inactive"));let e=o.querySelector(".carousel-nav-numbers");if(e){for(var n in e.children)"object"==typeof e.children[n]&&this.removeClass(e.children[n],"active");s=e.querySelector(".carousel-button:nth-of-type("+a+")");s&&this.addClass(s,"active")}}o.setAttribute("data-active-index",a),i.scrollTo(t.offsetLeft-r,0)}}}},LoopGal.prototype.updateW=function(){this.wTop=window.scrollY||window.pageYOffset,this.wBottom=this.wTop+window.innerHeight,this.wHeight=window.innerHeight,this.wWidth=window.innerWidth,"function"==typeof this.fixVideoHeight&&this.fixVideoHeight()},LoopGal.prototype.refreshAds=function(){if("undefined"!=typeof Looper)try{var e={};document.getElementById("div-ad-floating")&&(e["div-ad-floating"]=Looper.getBidSizes("floating")),document.getElementById("div-ad-adhesion-top")&&Looper.getBidSizes("adhesion-top")&&(e["div-ad-adhesion-top"]=Looper.getBidSizes("adhesion-top")),document.getElementById("div-ad-adhesion-bottom")&&Looper.getBidSizes("adhesion-bottom")&&(e["div-ad-adhesion-bottom"]=Looper.getBidSizes("adhesion-bottom")),Looper.runAuction(e,!0),this.isDev&&console.log("[LoopGal] "+(new Date).toUTCString()+" adTimeout init")}catch(e){}},LoopGal.prototype.refreshAdsOnInterval=function(){if("undefined"!=typeof Looper){var e=((new Date).getTime()-this.lastScrollTime)/1e3;if(this.isDev&&console.log("[LoopGal] Last Scroll: "+e),65<=e)this.refreshLock(),clearInterval(this.adIntervalTimeout),this.adIntervalTimeout=!1,this.isDev&&console.log("[LoopGal] "+(new Date).toUTCString()+" Interval Idle");else try{var t={};document.getElementById("div-ad-floating")&&(t["div-ad-floating"]=Looper.getBidSizes("floating")),document.getElementById("div-ad-adhesion-top")&&Looper.getBidSizes("adhesion-top")&&(t["div-ad-adhesion-top"]=Looper.getBidSizes("adhesion-top")),document.getElementById("div-ad-adhesion-bottom")&&Looper.getBidSizes("adhesion-bottom")&&(t["div-ad-adhesion-bottom"]=Looper.getBidSizes("adhesion-bottom")),this.isDev&&console.log("[LoopGal] "+(new Date).toUTCString()+" Run Interval "),this.adTimeout&&!0!==this.adTimeout&&(clearTimeout(this.adTimeout),this.adTimeout=!0,this.isDev&&console.log("[LoopGal] "+(new Date).toUTCString()+" Clear Interactive")),Looper.runAuction(t,!0)}catch(e){}}},LoopGal.prototype.refreshLock=function(){this.adTimeout=!1},LoopGal.prototype.refreshIntervalLock=function(){this.refreshInterval&&(this.adTimeout&&!0!==this.adTimeout&&(clearTimeout(this.adTimeout),this.adTimeout=!0),this.adIntervalTimeout&&!0!==this.adIntervalTimeout&&clearInterval(this.adIntervalTimeout),this.adIntervalTimeout=setInterval(this.refreshAdsOnInterval.bind(this),1e3*this.refreshInterval),this.isDev&&console.log("[LoopGal] "+(new Date).toUTCString()+" Reactivate Interval"))},LoopGal.prototype.triggerRefreshAd=function(){this.adTimeout||(this.refreshAds(),this.adTimeout=setTimeout(this.refreshLock.bind(this),15e3))},LoopGal.prototype.getCurrentArticles=function(){for(var e={},t=document.getElementsByClassName("title-gallery"),i=0;i<t.length;i++){var o=t[i].getAttribute("data-post-id");o&&(e[o]=1)}return e},LoopGal.prototype.loadNextArticleURL=function(){var e=this.getNextArticleURL(!0);if(!e)return!1;if(e&&""!=e.getAttribute("value"))return!1;if(this.callingNextArticle)return!1;var t=[];if(!(t=void 0!==LooperConfig.categories?LooperConfig.categories:t).length)return!1;var l=this.getCurrentArticles(),i=this.getCount(l);this.callingNextArticle=!0;e=i+1;e<40&&(e=40);var d="articles",i=document.getElementById("main");i&&(d=i.getAttribute("data-post-type")),this.ajax("/?action=more-galleries&t="+d+"&n="+e+"&c="+t.join("-"),"GET",function(e){var t=this.getNextArticleURL(!0);if("0"===e||0===e)t&&t.setAttribute("value",e);else{var i,o=!1,a=[];for(i in e)"news"==d?a.unshift(i):a.push(i);if("news"!=d)for(var r=0;r<a.length;r++){var s=a[r],n=Math.floor(Math.random()*a.length);a[r]=a[n],a[n]=s}for(r=0;r<a.length;r++)if(void 0===l[a[r]]){o=a[r];break}if(this.callingNextArticle=!1,!t)return!1;o?(e=e[o],this.isDev&&-1<document.location.host.indexOf("dev.")&&(e=e.replace("www.","dev.")),t.setAttribute("value",e)):t&&t.setAttribute("value",0)}}.bind(this))},LoopGal.prototype.attachSliderListeners=function(){let t=document.querySelectorAll(".ossum-comparison");for(let e=0;e<t.length;e++)t[e].getAttribute("data-attached")||(t[e].addEventListener("input",this.handleComparisonSlider.bind(this)),t[e].setAttribute("data-attached",1))},LoopGal.prototype.handleComparisonSlider=function(e){let t=this.closest(e.target,".ossum-comparison");t.style.setProperty("--position",e.target.value+"%")},LoopGal.prototype.getNextArticleURL=function(e){for(var t=document.querySelectorAll(".next-article-url"),i=!1,o=0;o<t.length;o++)this.hasClass(t[o],"loaded")||(i=t[o]);if(i){var a,r=i.getAttribute("value");
1if(r&&(a=this.getArticleID(r),void 0!==this.seenArticles[a]&&i.setAttribute("value","")),e)return i;if(r)return r}return!1},LoopGal.prototype.loadNextArticle=function(){if(this.callingNextArticle)return!1;var e=(new Date).getTime();if(window.scrollY<=0&&e-this.articleTime<2500)return!1;this.loadNextArticleURL(),void 0===this.seenArticles[this.postID]&&(this.seenArticles[this.postID]=1,this.scrolledArticles[this.postID]=1);var t=400;void 0!==this.nextArticleVOffset&&(t=this.nextArticleVOffset),void 0!==window.devicePixelRatio&&1<window.devicePixelRatio&&(t*=window.devicePixelRatio),"desktop"==this.device&&(t=200);var i=!1,e=document.querySelector("#content article:last-of-type > .news-article:last-of-type");if(!(i=void 0!==(i=(i=e?e.querySelector(".gallery-image, .gallery-image.video, .gallery-image-holder .oembed-container, .gallery-image-holder .gallery-image-video, .slide-key"):i)||document.querySelectorAll("#content article:last-of-type > .gallery-image-holder:last-child, #content article:last-of-type .slide-key")).length&&0<i.length?i[i.length-1]:i)||i instanceof NodeList)return!1;i=this.isInView(i,t);if(this.updateW(),i.partial||i.past||i.pct){t=this.getNextArticleURL();if(this.isDev&&console.log("[LoopGal] Loading next article: "+t),t&&"0"!=t){var f=this.getArticleID(t),i=this.getNextArticleURL(!0);if(f&&void 0!==this.seenArticles[f])return this.callingNextArticle||(i.setAttribute("value",""),setTimeout(this.loadNextArticle,500)),!1;void 0!==this.seenArticles[f]&&this.seenArticles[f]||(this.seenArticles[f]=1),this.addClass(i,"loaded");i=document.createElement("DIV");i.className="loading-more",i.innerHTML='<svg class="loading-spinner" version="1.1" id="loader-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="40px" height="40px" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50;" xml:space="preserve"><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"><animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"/></path></svg>',document.getElementById("content").appendChild(i);this.getCurrentArticles();i={ajax:1};this.fromFacebook&&(i.fromfb=1),this.fromZerg&&(i.zergnet=1),this.ajax(t,"GET",function(e){var t,i=document.querySelectorAll("article.news-post");if(3<i.length)for(var o=0;o<i.length-3;o++)if(!this.hasClass(i[o],"emptied")){for(var a=i[o].querySelectorAll(".google-ad-placeholder.loaded"),r=0;r<a.length;r++)a[r].innerHTML="";this.addClass(i[o],"emptied")}this.v3UI?((t=document.createElement("H2")).className="section-header nextup-heading",t.innerHTML="Next Up"):((t=document.createElement("DIV")).className="divider-heading-container divider-heading nextup-heading",t.innerHTML="<span>Next Up</span>");var s=document.createElement("DIV");s.innerHTML=e;var n=document.createDocumentFragment();n.appendChild(s);var l,d,h=n.querySelectorAll("SCRIPT"),c=[],p=[],u=!1;for(void 0!==window.instagrm&&void 0!==window.instagrm.Embeds&&void 0!==window.instagrm.Embeds.process&&(u=!0),o=0;o<h.length;o++)u||"//platform.instagram.com/en_US/embeds.js"!=h[o].src&&"//platform.instagram.com/en_US/embed.js"!=h[o].src&&"https://platform.instagram.com/en_US/embeds.js"!=h[o].src&&"https://platform.instagram.com/en_US/embed.js"!=h[o].src?h[o].src&&"module"!==(h[o].type||"").toLowerCase()?((l=document.createElement("SCRIPT")).src=h[o].src,l.type=h[o].type,l.async=h[o].async,c.push(l)):h[o].innerText&&(l=document.createElement("SCRIPT"),d=document.createTextNode(h[o].innerText.replace(this.rcleanScript,"")),l.type=h[o].type,l.async=h[o].async,l.appendChild(d),p.push(l),h[o].innerText=""):((l=document.createElement("SCRIPT")).src=h[o].src,l.async="async",l.defer="defer",u=!0,c.push(l));for(o=h.length-1;0<=o;o--)h[o].type="text/plain",h[o].className="toremove";e=n.querySelector(".disqus-comment-container");e&&e.addEventListener("click",this.disqusListener);n=n.querySelector(".openweb-comment-count");n&&n.addEventListener("click",this.openWebListener.bind(this)),document.getElementById("content").appendChild(t);for(var g=Array.from(s.children),o=0;o<g.length;o++)document.getElementById("content").appendChild(g[o]);for(e&&this.updateCommentCount(e.getAttribute("data-disqus-identifier")),u&&void 0!==window.instagrm&&void 0!==window.instagrm.Embeds&&void 0!==window.instagrm.Embeds.process&&window.instagm.Embeds.process(),o=0;o<c.length;o++)document.getElementById("content").appendChild(c[o]);for(o=0;o<p.length;o++)document.getElementById("content").appendChild(p[o]);var m=document.getElementById("content").querySelectorAll(".toremove");for(o=m.length-1;0<=o;o--)void 0!==m[o].parentNode&&m[o].parentNode.removeChild(m[o]);var v=document.querySelectorAll(".loading-more");for(o=0;o<v.length;o++)v[o].parentNode.removeChild(v[o]);if("undefined"!=typeof Looper&&"function"==typeof Looper.loadGoogleAds&&googletag.cmd.push(Looper.loadGoogleAds),"function"==typeof this.loadNextArticleCallback&&this.loadNextArticleCallback.call(this,f),this.attachToRecipe(),this.attachSliderListeners(),this.attachLiveblog(),"undefined"!=typeof FB&&"undefined"!==FB.XFBML)try{FB.XFBML.parse()}catch(e){}setTimeout(this.fixVideoHeight.bind(this),150),void 0!==window.instgrm&&void 0!==window.instgrm.Embeds&&void 0!==window.instgrm.Embeds.process&&setTimeout(window.instgrm.Embeds.process,500)}.bind(this),i)}}},LoopGal.prototype.fixVideoHeight=function(){var e=document.querySelectorAll("iframe.oembed, .gallery-image-video, .iframely.video, .iframely.generic, .oembed-container.iframely");if(e.length)for(var t,i=0;i<e.length;i++)this.hasClass(e[i],"no-auto-height")||(t=e[i].getBoundingClientRect(),e[i].style.height=.5625*parseInt(t.width)+"px")},LoopGal.prototype.fixImport=function(e){var t=e.currentTarget||e.target;t.removeEventListener("error",this.fixImport),t.removeEventListener("error",this.fixImport,!0);
1var i=t.getAttribute("data-slashfilm-src");i&&t.src!=i&&(this.removeClass(t,"slashfilmimportimage"),(e=document.createElement("IMG")).className=t.className,e.src=i,e.setAttribute("data-slide-url",t.getAttribute("data-slide-url")),e.setAttribute("data-slide-num",t.getAttribute("data-slide-num")),e.setAttribute("data-slide-title",t.getAttribute("data-slide-title")),e.setAttribute("data-post-id",t.getAttribute("data-post-id")),e.alt=t.alt,t.src=i,i=this.closest(t,".image-holder"),t=this.closest(t,"picture"),i.replaceChild(e,t))},LoopGal.prototype.scrollHandle=function(e){var t=(new Date).getTime(),i=t-this.lastScrollTime,o=300;if("desktop"!=this.device&&(o=600),this.refreshInterval&&!this.adIntervalTimeout&&this.refreshIntervalLock(),!(e=!0!==typeof e?!1:e)&&0<this.lastScrollTime&&i<o)this.scrollTimeout||(this.isDev&&console.log("[LoopGal] Scroll event deferred"),this.scrollTimeout=setTimeout(function(){this.scrollHandle(!0),this.scrollTimeout=!1}.bind(this),o));else{this.isDev&&console.log("[LoopGal] Scroll Event: "+i),clearTimeout(this.scrollTimeout),this.lastScrollTime=t,this.triggerRefreshAd(),this.updateW(),this.loadNextArticle();t=document.getElementById("header");"desktop"==this.device&&800<this.wTop?this.hasClass(t,"scrolled")||this.addClass(t,"scrolled"):this.doHeaderHide&&!e&&"mobile"==this.device?100<this.wTop&&this.lastScroll&&this.wTop>this.lastScroll?this.addClass(t,"header-hide"):(this.wTop<100||this.wTop<this.lastScroll)&&this.removeClass(t,"header-hide"):this.removeClass(t,"scrolled"),0<this.wTop&&(this.lastScroll=this.wTop);for(var a=document.querySelectorAll("img.lazyload"),r=0;r<a.length;r++){var s=a[r].getBoundingClientRect();if(0<s.width&&0!=s.top&&0<=s.left&&s.top<this.wHeight+1e3){if("PICTURE"==a[r].parentNode.nodeName)for(var n=a[r].parentNode.getElementsByTagName("SOURCE"),l=0;l<n.length;l++)n[l].setAttribute("srcset",n[l].getAttribute("data-srcset"));a[r].src=a[r].getAttribute("data-lazy-src"),this.removeClass(a[r],"lazyload")}}for(var d,h=document.querySelectorAll("article .slide-key"),c=!1,p=!1,u=0,r=0;!(d=this.isInView(h[r])).past&&d.partial&&(p=0<r?h[r]:h[0],c=!0,u=h[r].getAttribute("data-slide-num")),++r<h.length&&!c;);if(c&&p){var g,m=p.getAttribute("data-post-id");m&&m!=this.lastArticle&&(this.postID=m,this.seenArticles[this.postID]=2),"undefined"!=typeof ga&&(m&&m!=this.lastArticle||u!=this.currentSlide)&&ga("send","pageview");var t=h[Math.ceil(h.length/2)-1],v=h[h.length-1];if(this.newGTM&&p===t&&m&&!this.slideTracked50[m]&&1<h.length){let e=Object.assign({},LooperConfig.ga4data);e.event="50_read",window.dataLayer.push(e),this.slideTracked50[m]=!0}else"undefined"!=typeof gtag&&p===t&&m&&!this.slideTracked50[m]&&1<h.length&&(gtag("event","50_read",LooperConfig.ga4data),this.slideTracked50[m]=!0);if(this.newGTM&&p===v&&m&&!this.slideTracked100[m]){let e=Object.assign({},LooperConfig.ga4data);e.event="100_read",window.dataLayer.push(e),this.slideTracked100[m]=!0}else"undefined"!=typeof gtag&&p===v&&m&&!this.slideTracked100[m]&&(gtag("event","100_read",LooperConfig.ga4data),this.slideTracked100[m]=!0);m&&(this.lastArticle=m),this.currentSlide=u}"undefined"!=typeof Looper&&"function"==typeof Looper.loadGoogleAds&&googletag.cmd.push(Looper.loadGoogleAds);var f=null,y=document.querySelectorAll(".under-art, h1");if(2<y.length)for(r=y.length-1;0<=r;r--){var w=this.wHeight/4,b=y[r].getBoundingClientRect();if(b.y<w||b.y<0){w=y[r].getAttribute("data-post-url");w?g=y[r].getAttribute("data-post-title"):(L=y[r].closest("article").querySelector(".lead-image-holder"))&&(g=L.getAttribute("data-post-title"),w=L.getAttribute("data-post-url"));b=y[r].getAttribute("data-post-id");if(this.isDev&&(console.log("[LoopGal] Next Post ID: "+b),console.log("[LoopGal] EE: "+y[r].tagName)),w&&g){var L=document.getElementById("top-nav-title");if(L.innerHTML!=g){L.innerHTML=g,this.isDev&&console.log("[LoopGal] Title Change");try{if(void 0===this.scrolledArticles[b]&&"H1"==y[r].tagName&&void 0!==LooperConfig.ga4tag&&void 0!==LooperConfig.ga4data){LooperConfig.ga4data={},LooperConfig.ga4data.page_location=w,LooperConfig.ga4data.page_title=g,LooperConfig.ga4data.first_view=!1,LooperConfig.ga4data.author=y[r].getAttribute("data-author"),LooperConfig.ga4data.category=y[r].getAttribute("data-category"),LooperConfig.ga4data.content_type=y[r].getAttribute("data-content_type"),LooperConfig.ga4data.mod_date=y[r].getAttribute("data-mod_date"),LooperConfig.ga4data.layout=y[r].getAttribute("data-layout"),LooperConfig.ga4data.post_id=y[r].getAttribute("data-post_id"),LooperConfig.ga4data.pub_date=y[r].getAttribute("data-pub_date"),LooperConfig.ga4data.day=y[r].getAttribute("data-day"),LooperConfig.ga4data.dayhour=y[r].getAttribute("data-dayhour"),LooperConfig.ga4data.pubhour=y[r].getAttribute("data-pubhour"),LooperConfig.ga4data.num_slides=y[r].getAttribute("data-num_slides"),LooperConfig.ga4data.num_words=y[r].getAttribute("data-num_words"),LooperConfig.ga4data.pitcher=y[r].getAttribute("data-pitcher");var C=y[r].getAttribute("data-intent");C&&(LooperConfig.ga4data.intent=C);var T=y[r].getAttribute("data-ideation");T&&(LooperConfig.ga4data.ideation=T);var A=y[r].getAttribute("data-importanttopic");A&&(LooperConfig.ga4data.importantTopic=A);const x=Array.from(document.querySelectorAll("article"));var S=y[r].closest("article"),I=x.indexOf(S);const E=0<I?x[I-1]:null,D=E?E.querySelector("h1"):null;D&&(f=D.getAttribute("data-post-id"));const k=E?E.querySelector(".lead-image-holder"):null;if(k&&(lastUrl=k.getAttribute("data-post-url")),this.updateViewType(f,lastUrl),LooperConfig.ga4data.view_type=this.viewT
1ype,LooperConfig.ga4data.last_id=this.lastID,LooperConfig.ga4data.last_url=this.lastURL,LooperConfig.ga4data.infinite_position=++this.articleNum,this.newGTM){let e=Object.assign({},LooperConfig.ga4data);e.event="looper_page_view_ready",window.dataLayer.push(e)}else"function"==typeof gtag&&gtag("config",LooperConfig.ga4tag,LooperConfig.ga4data);this.isDev&&console.log("[LoopGal] History State Update"),document.title=g,history.pushState(LooperConfig.ga4data,"",w),this.scrolledArticles[b]=1}else document.location!=w&&(this.isDev&&console.log("[LoopGal] History State Fallback"),history.replaceState(null,g,w))}catch(e){}}break}}}v=document.querySelectorAll("h1");if(2<=v.length&&void 0===this.engagedArticles[this.postID]){m=v[v.length-1],v=this.isInView(m,0);if(v.partial&&80<=v.pct||v.past||v.full){let o=this.closest(m,"article");if(o){let e=o.querySelector(".slide-key");if(e){let i=e.getAttribute("data-post-url");v=this.getArticleID(i);if(void 0!==this.seenArticles[v]&&void 0===this.gaInfArticles[v]){this.gaInfArticles[v]=!0,window.marfeel=window.marfeel||{cmd:[]},window.marfeel.cmd.push(["compass",function(e){"function"==typeof e.trackNewPage&&e.trackNewPage({url:i,rs:"Infinite Scroll"})}]);let e=Object.assign({},LooperConfig.ga4data);e.action="load",e.url=i,this.newGTM?(e.event="infinite_scroll",window.dataLayer.push(e)):"function"==typeof gtag&&gtag("event","infinite_scroll",e)}else if(void 0===this.engagedArticles[v]){m=o.querySelectorAll("h2");let t;if(2<=m.length)t=m[1];else{let e=o.querySelectorAll("p");e.length&&(t=e.item(e.length-1))}if(t){m=this.isInView(t,0);if(m.past||m.full){this.engagedArticles[v]=!0;let e=Object.assign({},LooperConfig.ga4data);e.action="engagement",e.url=i,this.newGTM?(e.event="infinite_scroll",window.dataLayer.push(e)):"function"==typeof gtag&&gtag("event","infinite_scroll",e)}}}}}}}}},LoopGal.prototype.initializeRecipe=function(){if(void 0===this.galleryCookie){this.galleryCookie={};var e=document.cookie;if(e){var t=e.split(";");if(t.length)for(var i=0;i<t.length;i++){var o=t[i].split("=");o.length&&-1!==o[0].indexOf("gallery")&&(this.galleryCookie[o[0].trim()]=o[1].trim())}}}if(void 0!==this.galleryCookie["gallery-"+this.postID])for(var a=document.querySelectorAll(".Stars.hover.post-"+this.postID),i=0;i<a.length;i++)this.removeClass(a[i],"hover"),this.addClass(a[i],"rated"),a[i].style.setProperty("--rating",parseInt(this.galleryCookie["gallery-"+this.postID]))},LoopGal.prototype.attachToCode=function(){for(var e=document.querySelectorAll("pre"),t=0;t<e.length;t++)e[t].parentNode.innerHTML=e[t].parentNode.innerHTML.replace(e[t].outerHTML,"<div class='precon'>"+e[t].outerHTML+"</div>");for(e=document.querySelectorAll(".precon"),t=0;t<e.length;t++){var i=document.createElement("DIV");i.className="pre-icon",i.innerHTML='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 115.77 122.88" style="enable-background:new 0 0 115.77 122.88" xml:space="preserve"><style type="text/css">.st0{fill-rule:evenodd;clip-rule:evenodd;}</style><g><path class="st0" d="M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"/></g></svg>
1',i.addEventListener("click",this.codeClick.bind(this)),e[t].appendChild(i)}},LoopGal.prototype.codeClick=function(e){var t=this.closest(e.currentTarget,".precon");this.addClass(e.currentTarget.querySelector("SVG"),"active"),!t||(t=t.querySelector("pre"))&&(t=t.innerHTML.trim(),navigator.clipboard.writeText(t),setTimeout(function(e){this.removeClass(e,"active")}.bind(this,e.currentTarget.querySelector("SVG")),200))},LoopGal.prototype.attachToRecipe=function(){for(var e=document.querySelectorAll(".Stars.hover"),t=0;t<e.length;t++)this.hasClass(e[t],"init")||(this.initializeRecipe(),e[t].addEventListener("mouseover",this.recipeHover.bind(this)),e[t].addEventListener("mousemove",this.recipeHover.bind(this)),e[t].addEventListener("mouseout",this.recipeEndHover.bind(this)),e[t].addEventListener("click",this.recipeClick.bind(this)),this.addClass(e[t],"init"))},LoopGal.prototype.recipeHover=function(e){var t=e.currentTarget,i=t.parentNode.querySelector(".Stars.rating");i&&(i=i.getBoundingClientRect().width,i=Math.max(1,Math.ceil(e.offsetX/i*100/20)),t.style.setProperty("--rating",i))},LoopGal.prototype.recipeClick=function(e){var s,t=e.currentTarget.parentNode.querySelector(".Stars.rating");t&&(t=t.getBoundingClientRect().width,s=Math.max(1,Math.ceil(e.offsetX/t*100/20)),"mashed"!=(t=window.location.hostname.replace(/^(dev|www)\./,"").replace(/\.com$/,"").toLowerCase())&&"healthdigest"!=t&&"tastingtable"!=t&&"thedailymeal"!=t&&"foodrepublic"!=t||this.ajax("https://y."+t+".com/r","POST",function(e){if(this.galleryCookie["gallery-"+this.postID]=s,"O"==e){e=new Date;e.setTime(e.getTime()+2592e6);var t,i="expires="+e.toUTCString();for(t in this.galleryCookie){var o="";this.galleryCookie.hasOwnProperty(t)&&(o+=t+"="+this.galleryCookie[t]+"; "),o+=i+"; path=/",document.cookie=o}for(var a=document.querySelectorAll(".Stars.hover.post-"+this.postID),r=0;r<a.length;r++)this.removeClass(a[r],"hover"),this.addClass(a[r],"rated"),a[r].style.setProperty("--rating",s)}}.bind(this),"r="+s+"&p="+this.postID,{contentType:"application/x-www-form-urlencoded"}))},LoopGal.prototype.recipeEndHover=function(e){e=e.currentTarget;void 0!==this.galleryCookie["gallery-"+this.postID]?e.style.setProperty("--rating",parseInt(this.galleryCookie["gallery-"+this.postID])):e.style.setProperty("--rating",0)},LoopGal.prototype.attachLiveblog=function(){this.allowLiveblog&&document.querySelectorAll("body .liveblog-container").length&&this.initializeLiveblog()},LoopGal.prototype.initializeLiveblog=function(){this.liveblogIntervalTimeout||(this.liveblogURL=document.location.href,document.querySelectorAll(".live-blog.active").length&&(this.liveblogIntervalTimeout=setInterval(this.pollLiveblog.bind(this),1e3*this.liveblogRefreshInterval)))},LoopGal.prototype.pollLiveblog=function(e){if(this.liveblogURL){var t=Math.round(Date.now()/1e3),t=15*Math.round(t/15);let e=this.liveblogURL;-1==e.indexOf("?")?e+="?":e+="&",e+="mode=update&ajax=1&c="+t,this.ajax(e,"GET",function(r){if("object"==typeof r)for(var s in r)if(r.hasOwnProperty(s)){var n="le-"+s;let a=document.getElementById("liveblog-"+this.postID);if(a){let e=document.createDocumentFragment(),t=document.createElement("DIV");t.innerHTML=r[s],e.appendChild(t);let i=e.firstElementChild.firstElementChild;s=i.getAttribute("data-hash");let o=a.getElementsByClassName(n);o.length?void 0!==o[0]&&o[0].getAttribute("data-hash")!=s&&(o[0].innerHTML=i.innerHTML):(this.addClass(i,"new"),a.insertBefore(i,a.firstElementChild),setTimeout(function(){this.removeClass(a.firstElementChild,"new")}.bind(this,a),500))}}}.bind(this))}},LoopGal.prototype.openWebListener=function(e){let t=this.closest(e.target,".openweb-comment-container"),i=t.querySelector(".openweb-conversation");i&&(i.style.display="block",e.target.style.display="none")},LoopGal.prototype.initOpenWeb=function(e){if(this.openWebID)for(var t=document.getElementsByClassName("openweb-comment-count"),i=0;i<t.length;i++)this.hasClass(t[i],"initialized")||t[i].addEventListener("click",this.openWebListener.bind(this))},LoopGal.prototype.disqusListener=function(e){var t=document.getElementById("disqus_thread");if(t&&t.parentNode.removeChild(t),Looper.hasClass(this,"closed")){for(var i=document.querySelectorAll(".disqus-comment-container"),o=0;o<i.length;o++)Looper.addClass(i[o],"closed");Looper.removeClass(this,"closed"),(t=document.createElement("DIV")).id="disqus_thread";var a=this.parentNode.querySelector(".disqus-thread-container");(a||this.parentNode).appendChild(t);var r={id:this.getAttribute("data-disqus-identifier"),url:this.getAttribute("data-post-url"),title:this.getAttribute("data-post-title")};void 0===window.DISQUS?(window.disqus_config=function(){this.page.url=r.url,this.page.identifier=r.id,this.page.title=r.title},(t=document.createElement("script")).src="//"+this.getAttribute("data-disqus-domain")+".disqus.com/embed.js",t.setAttribute("data-timestamp",+new Date),(document.head||document.body).appendChild(t)):window.DISQUS.reset({reload:!0,config:function(){this.page.url=r.url,this.page.identifier=r.id,this.page.title=r.title}}
1)}else Looper.addClass(this,"closed")},LoopGal.prototype.updateCommentCount=function(e){void 0!==window.DISQUSWIDGETS&&"function"==typeof window.DISQUSWIDGETS.getCount&&window.DISQUSWIDGETS.getCount(e)},LoopGal.prototype.initDisqus=function(){if(this.disqusDomain)for(var e=document.getElementsByClassName("disqus-comment-container"),t=0;t<e.length;t++)e[t].addEventListener("click",this.disqusListener)};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.