/* Add custom JS code below */ [...document.querySelectorAll('main section, .s-block, footer > *')].forEach(el => { const r = el.getBoundingClientRect(); const cs = getComputedStyle(el); const txt = el.innerText.trim().length; const media = el.querySelectorAll('img,video,svg,iframe').length; if (r.height > 120 && txt < 20 && media === 0) console.log('فارغ:', el.className, Math.round(r.height) + 'px', cs.padding, cs.margin); }); !e.children.length && e.innerText?.includes('مجموع المنتجات')).pop(); while (el && el !== document.body) { const s = getComputedStyle(el); console.log(el.tagName + '.' + String(el.className).split(' ').join('.'), '| pos:', s.position, '| bg:', s.backgroundColor, '| h:', Math.round(el.getBoundingClientRect().height)); el = el.parentElement; } const c = document.querySelector('.s-product-card-entry') || document.querySelector('[class*="product-card"]'); function walk(el, d = 0) { console.log(' '.repeat(d) + el.tagName.toLowerCase() + '.' + String(el.className).split(' ').join('.'), '| pos:', getComputedStyle(el).position, '| h:', Math.round(el.getBoundingClientRect().height)); [...el.children].forEach(ch => walk(ch, d + 1)); } walk(c); const c = document.querySelector('.s-product-card-entry') || document.querySelector('[class*="product-card"]'); (function walk(el, d) { const s = getComputedStyle(el), r = el.getBoundingClientRect(); console.log(' '.repeat(d) + el.tagName.toLowerCase() + '.' + String(el.className).split(' ').join('.'), '| pos:', s.position, '| mt:', s.marginTop, '| h:', Math.round(r.height), '| bg:', s.backgroundColor); [...el.children].forEach(ch => walk(ch, d + 1)); })(c, 0);const c = document.querySelector('.s-product-card-entry') || document.querySelector('[class*="product-card"]'); (function walk(el, d) { const s = getComputedStyle(el), r = el.getBoundingClientRect(); console.log(' '.repeat(d) + el.tagName.toLowerCase() + '.' + String(el.className).split(' ').join('.'), '| pos:', s.position, '| mt:', s.marginTop, '| h:', Math.round(r.height), '| bg:', s.backgroundColor); [...el.children].forEach(ch => walk(ch, d + 1)); })(c, 0);