Files
haiperdohp-jemaytreeah/index.html
T
malonehunterandClaude Opus 5.5 d025c7e810 calc: escape the Date Calculator labels (escHtml); CHANGELOG v2.6.1
Completes the v2.6.0 escaping pass: the From/to description labels go through escHtml at the
date-menu render, the Print Date Durations label swap, and the restore after the image export.
Cache-bust bumps for the three scripts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 06:08:39 -04:00

237 lines
8.4 KiB
HTML

<!DOCTYPE html>
<head>
<title>Cypher Calculator</title> <!-- updated by config.js -->
<meta charset="utf-8" />
<meta
name="viewport"
content="width=520, maximum-scale=1, user-scalable=no"
/>
<link rel="shortcut icon" type="image/x-icon" href="res/favicon.png" />
<!-- Android Web App - Add to Home Screen -->
<link rel="manifest" href="manifest.json" />
<script src="config.js?v=11"></script>
<script src="lib/jquery.min.js?v=2"></script>
<!-- html2canvas v1.0.0-alpha.12 -->
<script src="calc/gematria.js?v=3"></script>
<script src="calc/calc.js?v=17"></script>
<script src="calc/init-variables.js?v=9"></script>
<script src="calc/ciphers.js?v=6"></script>
<link rel="stylesheet" type="text/css" href="calc/styles.css?v=10" />
<script>
window.onpaint = function () {
updateInterfaceColor(true); // update interface color (first run)
};
$(window).load(function () {
$("#loader").delay(287).fadeOut("fast");
});
</script>
</head>
<body>
<!-- initCalc() needs to run before the db loads to create menu properly-->
<!-- <body onload="initCalc(true)"> -->
<div id="loader"></div>
<canvas id="canv"></canvas>
<!-- preload font -->
<span style="font-family: 'Roboto Mono'"></span>
<div id="calcMain">
<center>
<div id="calcLogo">
<div id="logoText"></div>
<style>
.logoLetter { transition: font-family 0.1s; display: inline-block; }
.logoLetter:hover { font-family: matrix-font, monospace; color: #00ffcc; }
</style>
</div>
<script>
(function() {
var c = (typeof CALC_CONFIG !== 'undefined') ? CALC_CONFIG : {};
var name = c.siteName || "Cypher Calculator";
var color = c.logoColor || "#00ff41";
var glow = c.logoGlow || "";
var el = document.getElementById("logoText");
el.style.cssText = "color:"+color+";text-shadow:"+glow+";font-family:'Courier New',monospace;font-weight:bold;font-size:250%;letter-spacing:3px;cursor:default;";
if (c.logoHoverMatrix !== false) {
el.innerHTML = name.split("").map(function(ch){ return '<span class="logoLetter">'+ch+'</span>'; }).join("");
} else {
el.textContent = name;
}
document.title = c.siteTitle || name;
})();
</script>
</center>
<center>
<div id="calcOptionsPanel"></div>
<div id="colorControlsMenuArea"></div>
<div id="editCiphersMenuArea"></div>
<div id="dateCalcMenuArea"></div>
<div id="inputArea">
<span id="dbLoadIndicator" style="display:none;margin-right:6px;">
<svg width="22" height="22" viewBox="0 0 22 22" style="vertical-align:middle;animation:dbspin 1s linear infinite;">
<circle cx="11" cy="11" r="9" stroke="var(--font-color,#0ff)" stroke-width="2" fill="none" stroke-dasharray="40 20" stroke-linecap="round"/>
</svg>
</span>
<style>@keyframes dbspin{to{transform:rotate(360deg)}}</style>
<input
id="queryDBbtn"
class="hideValue"
type="button"
onclick="queryDatabase()"
value="Query"
/>
<input
id="phraseBox"
autofocus
type="text"
spellcheck="false"
autocomplete="off"
oninput="updateEnabledCipherTable(); updateWordBreakdown(breakCipher,false,false);"
onkeydown="if(event.key==='Enter'){phraseBoxKeypress(13)}else{phraseBoxKeypress(event.keyCode)}"
ondrop="dropHandler(event)"
ondragover="dragOverHandler(event)"
/>
<input
id="enterPhraseBtn"
type="button"
title="Add phrase to list"
onclick="addPhraseOnly()"
value="&#x21B5;"
/><input
id="autoMatchBtn"
class="hideValue"
type="button"
title="Auto-match ON — click to disable"
value="⚡"
onclick="toggleAutoMatch()"
/>
<input
id="highlightBox"
type="text"
spellcheck="false"
autocomplete="off"
placeholder="highlight #s"
/><input
id="hltModeBtn"
class="hltModeOff"
type="button"
title="Highlight: any matches (every cell with the value) — click for same column matches"
value="▼"
onclick="toggleHltMode()"
/><span id="clearFilterButton"></span>
</div>
<div id="enabledCiphTable"></div>
<div id="BreakdownDetails">
<div id="BreakdownSpot"></div>
<div id="ChartSpotScroll"><div id="ChartSpot"></div></div>
</div>
</center>
<center>
<div id="HistoryTableArea"></div>
</center>
</div>
<span id="loadPanel"></span>
<script src="calc/breakdown.js?v=4"></script>
<script src="calc/highlighter.js?v=3"></script>
<script src="calc/export.js?v=4"></script>
<script src="calc/export-csv.js?v=3"></script>
<script src="calc/num-prop.js?v=2"></script>
<script src="calc/edit-ciphers.js?v=2"></script>
<script src="calc/date-calc.js?v=3"></script>
<script src="calc/database.js?v=9"></script>
<script src="calc/quick-guide.js?v=2"></script>
<script src="calc/localstorage.js?v=3"></script>
<script src="calc/encoding.js?v=3"></script>
<script src="calc/encoding-ciphers.js?v=2"></script>
<script src="calc/coderain.js?v=2"></script>
<script src="lib/html2canvas.min.js?v=2"></script>
<!-- Initialzie the calculator. This needs to run before loading a database or theme. -->
<script>
initCalc(true);
</script>
<!-- AUTO LOAD DATABASE (DB) -->
<!-- Tries pre-computed db.json first (instant matching), falls back to db.txt (live mode) -->
<script>
// Show loading indicator
document.getElementById("dbLoadIndicator").style.display = "inline";
// Load pre-computed db.json (instant matching, ~16MB gzipped via mod_deflate)
// Falls back to db.txt (2.3MB, live mode with recalculation)
var _c = (typeof CALC_CONFIG !== 'undefined') ? CALC_CONFIG : {};
var _jsonUrl = _c.databaseJsonUrl || "db.json";
var _txtUrl = _c.databaseTxtUrl || "db.txt";
var _mode = _c.databaseMode || "auto";
var _liteUrl = _c.databaseLiteJsonUrl || "db_lite.json";
var _dbVer = _c.databaseVersion ? ("?v=" + _c.databaseVersion) : ""; // cache-bust db.json/db_lite.json on each regen
function _dbLoaded() {
document.getElementById("dbLoadIndicator").style.display = "none";
var amb = document.getElementById("autoMatchBtn");
amb.classList.remove("hideValue");
if (!autoMatchEnabled) amb.classList.add("matchOff");
// Sync hltModeBtn to the (possibly restored from localStorage) optHltSameCipher value.
if (typeof syncHltModeBtn === "function") syncHltModeBtn();
}
// Background: fetch the full 69-cipher set, then swap it in for the lite set.
function _fetchFull() {
fetch(_jsonUrl + _dbVer)
.then(function(r) { if (!r.ok) throw new Error("full db.json " + r.status); return r.json(); })
.then(function(data) { swapToFullDB(data); })
.catch(function(err) { console.log("Full DB unavailable (keeping lite):", err.message); });
}
if (_mode === "txt") {
var database = loadFile(_txtUrl);
importFileAction(database, true);
_dbLoaded();
} else {
// Progressive: lite first (fast first paint), then full in the background.
fetch(_liteUrl + _dbVer)
.then(function(r) { if (!r.ok) throw new Error("lite " + r.status); return r.json(); })
.then(function(data) { loadPrecomputedDB(data); _dbLoaded(); _fetchFull(); })
.catch(function(liteErr) {
console.log("Lite DB unavailable, loading full directly:", liteErr.message);
fetch(_jsonUrl + _dbVer)
.then(function(r) { if (!r.ok) throw new Error("db.json not found (" + r.status + ")"); return r.json(); })
.then(function(data) { loadPrecomputedDB(data); _dbLoaded(); })
.catch(function(err) {
console.log("Pre-computed DB not available, using live mode:", err.message);
var database = loadFile(_txtUrl);
importFileAction(database, true);
_dbLoaded();
});
});
}
</script>
<!-- AUTO LOAD THEME -->
<!-- To change the theme uncomment the script below -->
<!-- <script>
var theme = loadFile('theme/white-interface.js');
importFileAction(theme, true);
</script> -->
</body>