MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / readability

Function readability

graph-ui/tools/smoke-w10.mjs:1445–1467  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

1443 await mkdir(OUT_DIR, { recursive: true });
1444
1445 const readability = async (name) => {
1446 const top = await measureReadability(page, READABILITY_EXCLUSIONS);
1447 const scrolled = await scrollRegionsToEnd(page, READABILITY_EXCLUSIONS);
1448 await page.waitForTimeout(220);
1449 const bottom = await measureReadability(page, READABILITY_EXCLUSIONS);
1450 await resetScroll(page, READABILITY_EXCLUSIONS);
1451 extras.readability.push({
1452 name,
1453 scrolledRegions: scrolled.length,
1454 top: { candidates: top.candidates, overlaps: top.overlaps, clipped: top.clipped },
1455 bottom: {
1456 candidates: bottom.candidates,
1457 overlaps: bottom.overlaps,
1458 clipped: bottom.clipped,
1459 },
1460 });
1461 report.overlapViolations += top.overlaps.length + bottom.overlaps.length;
1462 report.clippingViolations += top.clipped.length + bottom.clipped.length;
1463 report.cutWithoutHint += [...top.clipped, ...bottom.clipped]
1464 .filter((entry) => entry.kind === 'cut-without-hint').length;
1465 log(`Lesbarkeit "${name}": ${top.overlaps.length + bottom.overlaps.length} Ueberlagerungen, `
1466 + `${top.clipped.length + bottom.clipped.length} Beschneidungen`);
1467 };
1468
1469 await openApp(page, origin);
1470

Callers 1

mainFunction · 0.70

Calls 5

measureReadabilityFunction · 0.90
scrollRegionsToEndFunction · 0.90
resetScrollFunction · 0.90
logFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected