Skip to content

Commit 847f28f

Browse files
authored
Merge pull request #40 from FuugaMo/auto-fix/no-turns-detected
fix: relax text length constraint for turn detection
2 parents eb8a288 + 685a940 commit 847f28f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

content.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ function makePathEntry(turn) {
567567
'main article',
568568
];
569569
const candidates = dedupeElements(fallbackSelectors.flatMap(sel => [...document.querySelectorAll(sel)]))
570-
.filter(el => isReadableTurnCandidate(el, { minText: 2 }));
570+
.filter(el => isReadableTurnCandidate(el, { minText: 0 }));
571571
turns = candidates
572572
.filter(el => !candidates.some(other => other !== el && other.contains(el)))
573573
.sort((a, b) => rectTop(a) - rectTop(b));
@@ -647,7 +647,7 @@ function makePathEntry(turn) {
647647
'[class*="HumanTurn"]',
648648
];
649649
return dedupeElements(selectTopLevelCandidates(selectors)
650-
.filter(el => isReadableTurnCandidate(el, { minText: 2 })))
650+
.filter(el => isReadableTurnCandidate(el, { minText: 0 })))
651651
.sort((a, b) => rectTop(a) - rectTop(b));
652652
}
653653

0 commit comments

Comments
 (0)