mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-08 02:36:10 +00:00
fix: address PR #339 review — 7 issues
1. Catalog failure safety: warn when catalog is empty or throws, so capture doesn't silently produce zero images 2. Dead path: extract-audio-data.py → skills/gsap/scripts/ (was skills/hyperframes/scripts/) 3. --json fonts compat: emit both `fonts` (string[]) and `fontsDetailed` (FontToken[]) to avoid breaking external consumers 4. Restore .cursorrules writing alongside AGENTS.md + CLAUDE.md 5. .gitignore: remove over-broad `projects/` and `videos/` entries, keep scoped `cursor-tests/` and `launch-video*/` 6. agentPromptGenerator: mark unused params as reserved with comments, remove _animations from buildPrompt 7. Cookie filter: threshold 20 → 8 chars to preserve footer copy like "© 2026 Stripe" (16 chars) and "Privacy & Terms" (15 chars) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
517e327294
commit
4e87f28cd9
@@ -134,9 +134,10 @@ export async function extractVisibleText(page: Page): Promise<string> {
|
||||
if (style.display === 'none' || style.visibility === 'hidden' || style.opacity === '0') continue;
|
||||
var tag = el.tagName.toLowerCase();
|
||||
if (tag === 'script' || tag === 'style' || tag === 'noscript') continue;
|
||||
// Skip short text inside nav/footer (catches nav links, cookie consent)
|
||||
// Skip very short text inside nav/footer (catches single-word nav links)
|
||||
// Threshold is 8 chars to preserve footer copy like "© 2026 Stripe" (16 chars)
|
||||
var inNavOrFooter = el.closest('nav, footer, [role="navigation"]');
|
||||
if (inNavOrFooter && text.length < 20) continue;
|
||||
if (inNavOrFooter && text.length < 8) continue;
|
||||
// Skip common cookie/consent patterns
|
||||
if (cookieRe.test(text)) continue;
|
||||
texts.push('[' + tag + '] ' + text);
|
||||
|
||||
Reference in New Issue
Block a user