Keep decision body order in fallback

Prepared and verified with AI assistance under maintainer authorization.
This commit is contained in:
Paul Bakaus
2026-08-12 15:25:04 -04:00
parent 37be3fa36b
commit 3a26dcb809
2 changed files with 13 additions and 1 deletions
+2
View File
@@ -907,8 +907,10 @@ function page() {
const textOnlyFacts = m.querySelector('template.text-only-facts');
const choose = body?.querySelector(':scope > button.choose');
if (body && textOnlyFacts && choose) {
const plainDetail = body.querySelector(':scope > .detail:not(.more)');
[...body.children].filter((el) => el.classList.contains('fact') || el.matches('.detail.more')).forEach((el) => el.remove());
choose.before(textOnlyFacts.content.cloneNode(true));
if (plainDetail) choose.before(plainDetail);
}
card?.classList.remove('flipped');
front?.classList.add('text-only');