// Jacob Whitmore Index, zero-click strand. SERP feature extractor used on 18 November 2026. // Paste into the browser console on a loaded google.co.uk results page. Returns one row. // Pixel values are distances from the top of the page in CSS pixels. (() => { const txt = document.body.innerText; const vis = e => e && e.getBoundingClientRect().height>0; const top = (e)=> e? Math.round(e.getBoundingClientRect().top+scrollY):null; const findVis = (re)=>[...document.querySelectorAll('div,span,h1,h2,h3,strong')].find(e=>e.childElementCount<3 && re.test((e.textContent||'').trim()) && vis(e)); const aio = findVis(/^AI Overview$/); const paa = findVis(/^People also ask$/); const sponsored = [...document.querySelectorAll('span,div,h1')].filter(e=>e.childElementCount<2 && /^Sponsored( results?| result)?$|^Sponsored [A-Z]/.test(e.textContent.trim()) && vis(e)); const da = [...document.querySelectorAll('.vk_c, .vk_bk, #cwos, #wob_wc, .obcontainer, [data-attrid="DictionaryHeader"], [data-attrid*="kc:/"], .xpdopen .LGOjhe, .IZ6rdc, .Z0LcW')].find(vis); const rso = document.querySelector('#rso')||document; const h3s=[...rso.querySelectorAll('a h3')].filter(h=>{const a=h.closest('a'); try{return a && vis(h) && !/google\./.test(new URL(a.href).hostname)}catch(e){return false}}); const firstOrg = h3s[0]; const local = findVis(/^(Places|Businesses|Locations|Places to (visit|eat))$/) || [...document.querySelectorAll('.rllt__details, g-map')].find(vis); return { query: new URLSearchParams(location.search).get('q'), ai_overview: !!aio, ai_overview_top_px: top(aio), direct_answer: !!da, direct_answer_top_px: top(da), people_also_ask: !!paa, ads_count: sponsored.length, ads_top_px: top(sponsored[0]), local_pack: !!local, top_stories: !!findVis(/^Top stories$/), videos: !!findVis(/^(Videos|Short videos)$/), forums: !!findVis(/^(Discussions and forums|What people are saying)$/), organic_results_page1: h3s.length, first_organic_top_px: top(firstOrg), first_organic_domain: firstOrg? new URL(firstOrg.closest('a').href).hostname.replace(/^www\./,''):null, viewport_height_px: innerHeight }; })();