update app and index.html
This commit is contained in:
+18
-2
@@ -49,7 +49,7 @@
|
||||
|
||||
// ── Element cache ────────────────────────────────────────────────────
|
||||
let listEl, countEl, detailNameEl, detailSubEl, detailBodyEl;
|
||||
let tabAll, tabHebrew, tabGreek, tabEnglish, tabArabic, tabEnochian;
|
||||
let tabAll, tabHebrew, tabGreek, tabGreekArchaic, tabEnglish, tabArabic, tabEnochian;
|
||||
let searchInputEl, searchClearEl, typeFilterEl;
|
||||
let gematriaCipherEl, gematriaInputEl, gematriaResultEl, gematriaBreakdownEl;
|
||||
let gematriaModeEls, gematriaMatchesEl, gematriaInputLabelEl, gematriaCipherLabelEl;
|
||||
@@ -64,6 +64,7 @@
|
||||
tabAll = document.getElementById("alpha-tab-all");
|
||||
tabHebrew = document.getElementById("alpha-tab-hebrew");
|
||||
tabGreek = document.getElementById("alpha-tab-greek");
|
||||
tabGreekArchaic = document.getElementById("alpha-tab-greek-archaic");
|
||||
tabEnglish = document.getElementById("alpha-tab-english");
|
||||
tabArabic = document.getElementById("alpha-tab-arabic");
|
||||
tabEnochian = document.getElementById("alpha-tab-enochian");
|
||||
@@ -356,6 +357,7 @@
|
||||
tabAll,
|
||||
tabHebrew,
|
||||
tabGreek,
|
||||
tabGreekArchaic,
|
||||
tabEnglish,
|
||||
tabArabic,
|
||||
tabEnochian,
|
||||
@@ -466,7 +468,7 @@
|
||||
}
|
||||
|
||||
// Attach tab listeners
|
||||
[tabAll, tabHebrew, tabGreek, tabEnglish, tabArabic, tabEnochian].forEach((btn) => {
|
||||
[tabAll, tabHebrew, tabGreek, tabGreekArchaic, tabEnglish, tabArabic, tabEnochian].forEach((btn) => {
|
||||
if (!btn) return;
|
||||
btn.addEventListener("click", () => {
|
||||
switchAlphabet(btn.dataset.alpha, null);
|
||||
@@ -482,6 +484,20 @@
|
||||
}
|
||||
|
||||
function selectGreekLetterByName(name) {
|
||||
const greekLetters = Array.isArray(state.alphabets?.greek) ? state.alphabets.greek : [];
|
||||
const archaicLetters = Array.isArray(state.alphabets?.greekArchaic) ? state.alphabets.greekArchaic : [];
|
||||
const targetKey = String(name || "").trim().toLowerCase();
|
||||
|
||||
if (archaicLetters.some((entry) => String(entry?.name || "").trim().toLowerCase() === targetKey)) {
|
||||
switchAlphabet("greekArchaic", name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (greekLetters.some((entry) => String(entry?.name || "").trim().toLowerCase() === targetKey)) {
|
||||
switchAlphabet("greek", name);
|
||||
return;
|
||||
}
|
||||
|
||||
switchAlphabet("greek", name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user