1headr_ads={init:function(){var n=null;let t=document.querySelector(".tt_category_id");t&&(n=t.getAttribute("content"));headr_ads.loadAdsByDevice(n);let i=detectDevice();window.addEventListener("resize",()=>{const t=detectDevice();t!==i&&(i=t,headr_ads.loadAdsByDevice(n))})},detectBotType:function(n){if(!n)return null;n=n.toLowerCase();for(const[t,i]of Object.entries({google:["googlebot","google-inspectiontool","pagespeed","chrome-lighthouse"],bing:["bingbot","msnbot","adidxbot"],facebook:["facebookexternalhit","facebookcatalog"],twitter:["twitterbot"],linkedin:["linkedinbot"],slack:["slackbot"],discord:["discordbot"],apple:["applebot"],pinterest:["pinterest"],seo_tools:["ahrefsbot","semrushbot","mj12bot","gtmetrix","lighthouse"]}))if(i.some(t=>new RegExp(t).test(n)))return t;return null},loadAdsByDevice:function(n){var t=navigator.userAgent,i=headr_ads.detectBotType(t);if(i==null){const i=detectDevice(),r=qs("body").getAttribute("data-api"),u=`${r}/NewsV2/GetAdsHeader?categoryId=${n}&device=${i}`,t=new XMLHttpRequest;t.open("GET",u,!0);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){if(t.readyState===4&&t.status===200)try{const n=JSON.parse(t.responseText);if(n&&n.headValue){const i=document.createElement("div");i.innerHTML=n.headValue;const t=document.getElementById("load_layout_head");if(!t)return;t.innerHTML="";Array.from(i.children).forEach(n=>{if(n.tagName==="SCRIPT"){const i=document.createElement("script");n.src?(i.src=n.src,i.async=!0):i.textContent=n.textContent;t.appendChild(i)}else t.appendChild(n.cloneNode(!0))})}}catch(n){}};t.send()}}};headr_ads.init()
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.