ux: default loadout -> base 4; add 'Curated' preset (config.recommendedCiphers)

Default-on is the clean base 4; a one-click 'Curated' preset enables an extended set defined by
config.recommendedCiphers (button only renders when that list is set). config.default.js documents
it; forks opt in by listing ciphers (keep in sync with the lite db.json). No db change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
malonehunterandClaude Opus 4.7 committed 2026-05-28 14:53:40 -04:00
1 parent 2570372ebf
commit a71eee7e07
3 files changed
+24 -3

No files matched your search

+18 -2
View File
@@ -266,8 +266,9 @@ function createCiphersMenu() {
'<input class="intBtn3 ciphPresetBtn" type="button" value="Empty" onclick="disableAllCiphers()">'; '<input class="intBtn3 ciphPresetBtn" type="button" value="Empty" onclick="disableAllCiphers()">';
o += o +=
'<input class="intBtn3 ciphPresetBtn" type="button" value="Base" onclick="enableBaseCiphers()">'; '<input class="intBtn3 ciphPresetBtn" type="button" value="Base" onclick="enableBaseCiphers()">';
o += if (typeof CALC_CONFIG !== 'undefined' && Array.isArray(CALC_CONFIG.recommendedCiphers) && CALC_CONFIG.recommendedCiphers.length > 0)
'<input class="intBtn3 ciphPresetBtn" type="button" value="Default" onclick="enableDefaultCiphers()">'; o +=
'<input class="intBtn3 ciphPresetBtn" type="button" value="Curated" onclick="enableRecommendedCiphers()">';
o += o +=
'<input class="intBtn3 ciphPresetBtn" type="button" value="All (EN)" onclick="enableAllEnglishCiphers()">'; '<input class="intBtn3 ciphPresetBtn" type="button" value="All (EN)" onclick="enableAllEnglishCiphers()">';
o += o +=
@@ -1623,6 +1624,21 @@ function enableBaseCiphers() {
updateTables(); // update updateTables(); // update
} }
// "Curated" preset: the fork's recommended extended loadout (CALC_CONFIG.recommendedCiphers,
// = the lite-db set, so all match instantly). Button only renders when that list is non-empty.
function enableRecommendedCiphers() {
prevCiphIndex = -1; // reset cipher selection
var rec = (typeof CALC_CONFIG !== 'undefined' && Array.isArray(CALC_CONFIG.recommendedCiphers)) ? CALC_CONFIG.recommendedCiphers : [];
var cur_chkbox;
for (i = 0; i < cipherList.length; i++) {
var on = rec.indexOf(cipherList[i].cipherName) > -1;
cipherList[i].enabled = on;
cur_chkbox = document.getElementById("cipher_chkbox" + i);
if (cur_chkbox !== null) cur_chkbox.checked = on;
}
updateTables(); // update
}
function toggleCipherCategory(ciph_cat) { function toggleCipherCategory(ciph_cat) {
prevCiphIndex = -1; // reset cipher selection prevCiphIndex = -1; // reset cipher selection
// Check if custom config category // Check if custom config category
+5
View File
@@ -53,6 +53,11 @@ var CALC_CONFIG = {
// defaultEnabledCiphers: ["Ordinal", "Reduction", "Reverse Ordinal", "Reverse Reduction"], // defaultEnabledCiphers: ["Ordinal", "Reduction", "Reverse Ordinal", "Reverse Reduction"],
defaultEnabledCiphers: [], defaultEnabledCiphers: [],
// Optional "Curated" preset button — a one-click extended loadout. Empty/omitted => no
// button shown. Keep in sync with the lite db.json (tools/generate_db_json.py LITE_CIPHERS).
// Example: recommendedCiphers: ["Ordinal", "Reduction", "Alphanumeric Qabbala", ...],
recommendedCiphers: [],
// --- Custom Cipher Categories --- // --- Custom Cipher Categories ---
// Group ciphers into custom menu sections. Ciphers are referenced by // Group ciphers into custom menu sections. Ciphers are referenced by
// their exact name from ciphers.js. They still appear in their original // their exact name from ciphers.js. They still appear in their original
+1 -1
View File
@@ -19,7 +19,7 @@ from pathlib import Path
from all_ciphers import get_ciphers, compute_value from all_ciphers import get_ciphers, compute_value
# Lite db.json cipher subset for progressive first-paint. MUST stay in sync with # Lite db.json cipher subset for progressive first-paint. MUST stay in sync with
# production config.js `defaultEnabledCiphers` (the default 16-cipher loadout). # production config.js `recommendedCiphers` (the 16-cipher "Curated" set).
LITE_CIPHERS = [ LITE_CIPHERS = [
"Ordinal", "Reduction", "Reverse Ordinal", "Reverse Reduction", "Ordinal", "Reduction", "Reverse Ordinal", "Reverse Reduction",
"Standard", "Latin (Jewish)", "English Sumerian", "Satanic Gematria", "Standard", "Latin (Jewish)", "English Sumerian", "Satanic Gematria",