← back to Domain Landings
5x sweep 1: wall skips thumbnail request for domains w/o a screenshot (kills 404 noise)
3e80d2ee2c224fb15762ddbf8c5722210f0c5f9c · 2026-08-17 16:59:37 -0700 · Steve Abrams
Files touched
Diff
commit 3e80d2ee2c224fb15762ddbf8c5722210f0c5f9c
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Aug 17 16:59:37 2026 -0700
5x sweep 1: wall skips thumbnail request for domains w/o a screenshot (kills 404 noise)
---
server.js | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/server.js b/server.js
index 134f42a..a122ff8 100644
--- a/server.js
+++ b/server.js
@@ -186,6 +186,10 @@ function adminWall(req, res) {
}
let sites = [];
try { sites = JSON.parse(fs.readFileSync(path.join(__dirname, 'data/all-sites.json'), 'utf8')); } catch {}
+ // mark which domains actually have a thumbnail so the client never requests a missing one (no 404s)
+ let thumbSet = new Set();
+ try { thumbSet = new Set(fs.readdirSync(path.join(__dirname, 'data/thumbs')).filter(f => f.endsWith('.jpg')).map(f => f.slice(0, -4))); } catch {}
+ sites = sites.map(s => ({ ...s, th: thumbSet.has(s.domain) ? 1 : 0 }));
res.writeHead(200, { 'content-type': 'text/html; charset=utf-8' });
res.end(`<!doctype html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1">
<title>Portfolio wall — ${sites.length} sites</title>
@@ -250,8 +254,8 @@ function render(){
else list.sort((a,b)=>(b.type===sv)-(a.type===sv)||a.domain.localeCompare(b.domain));
countEl.textContent=list.length+' shown';
grid.innerHTML=list.map(s=>'<div class=card><div class=frame data-dom="'+s.domain+'" title="click for live view">'+
- '<img loading=lazy src="/thumbs/'+s.domain+'.jpg" onerror="this.style.display=\\'none\\';this.nextElementSibling.style.display=\\'flex\\'">'+
- '<div class=ph style=display:none>'+s.domain+'<br><small>(no preview — click for live)</small></div>'+
+ (s.th?'<img loading=lazy src="/thumbs/'+s.domain+'.jpg" onerror="this.style.display=\\'none\\';this.nextElementSibling.style.display=\\'flex\\'">':'')+
+ '<div class=ph'+(s.th?' style=display:none':'')+'>'+s.domain+'<br><small>(no preview — click for live)</small></div>'+
'<span class=live>▶ live</span></div>'+
'<div class=meta><span class=dom><a href="https://'+s.domain+'/" target=_blank rel=noopener>'+s.domain+'</a></span>'+
'<span class="badge b-'+s.type+'">'+s.type+'</span></div></div>').join('');
← 978ba6d deploy: Meta pixel live on all 88 landings (GA4 + pixel now
·
back to Domain Landings
·
5x: portfolio wall clean twice (sweeps 2-3); report ce67c54 →