feat(calc): add toggle to prioritize Ingglish matches to top of query results

- Add optPrioritizeIngglish option (configurable via prioritizeIngglishMatches in config.default.js and persisted in localStorage via calcOptionsArr).
- Add 'Prioritize Ingglish [...]' checkbox (chkbox_PIM / conf_PIM()) to the Options Menu and a one-click 'ING ↑' toggle button (queryIngPriorityBtn) inside the Match Results table header that re-sorts open query modals in place via refreshOpenQuery().
- Unify match sorting in calc/database.js under compareQueryMatches(a, b, searchPhrase): pins exact full or comment-stripped phrase matches first, sorts [Ingglish: ...] rows above standard entries when optPrioritizeIngglish is enabled, and preserves score ordering within each group.
This commit is contained in:
Hermes Agent committed 2026-11-04 01:03:57 +00:00
1 parent c1e6a980e0
commit 01aee23ddc
5 files changed
+71 -14

No files matched your search

+1
View File
@@ -44,6 +44,7 @@ var CALC_CONFIG = {
// --- Defaults ---
autoMatchDesktop: true,
autoMatchMobile: false,
prioritizeIngglishMatches: false, // sort [Ingglish: ...] matches to top of query results
resultsPerPage: 12,
newPhrasesOnTop: true,