Compare commits
36
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fbf9728269 | ||
|
|
90a0d2d404 | ||
|
|
1f64cf3eaf | ||
|
|
196449f1a6 | ||
|
|
314c46efec | ||
|
|
352d5a84cf | ||
|
|
eb8fac7838 | ||
|
|
636f799d8a | ||
|
|
da5cd710c9 | ||
|
|
af830b9bb7 | ||
|
|
703c64ba00 | ||
|
|
4c892b7a5d | ||
|
|
2f334dd176 | ||
|
|
b93f08a64d | ||
|
|
81c164c159 | ||
|
|
8eac9dcf16 | ||
|
|
42fe10046b | ||
|
|
95e24cfd74 | ||
|
|
2b54e23a8c | ||
|
|
4f68a74cb5 | ||
|
|
ae2402c8fc | ||
|
|
8ba133e356 | ||
|
|
6f00218034 | ||
|
|
451dfb200d | ||
|
|
3e83969f3e | ||
|
|
0b8a5965d0 | ||
|
|
55e814fb72 | ||
|
|
ed36cd060e | ||
|
|
a5514cf2a7 | ||
|
|
c2e3a18975 | ||
|
|
73e7e07951 | ||
|
|
6198c85840 | ||
|
|
a28cb82988 | ||
|
|
644f6eee5f | ||
|
|
01975b7f3a | ||
|
|
01aee23ddc |
No files matched your search
@@ -2,3 +2,4 @@ config.js
|
||||
db.json
|
||||
__pycache__/
|
||||
*.pyc
|
||||
db_lite.json
|
||||
@@ -1,8 +1,14 @@
|
||||
# Cypher Calculator
|
||||
# `haiperdohp-jemaytreeah` — Cypher Calculator (`v2.13.0` — `https://hyperstitionstud.io/calc/`)
|
||||
|
||||
A gematria cypher calculator with pre-computed instant matching, 209k+ curated word database, and full whitelabel support via `config.js`.
|
||||
<!-- HS-COMMIT-STATUS:START -->
|
||||
> **Gitea Commit & Release Telemetry (`v2.13.0` • Namespace `urn:io:hyperstitionstud`)**
|
||||
> - **Repository Role & Public Route:** Multi-Cipher Browser Gematria Workbench (`82` ciphers, `231,615` Ingglish-provisioned `db.txt` entries, progressive `db_lite.json` + `db.json` hydration) → [`https://hyperstitionstud.io/calc/index.html`](https://hyperstitionstud.io/calc/index.html)
|
||||
> - **Latest Commit Scope (`haiperdohp-jemaytreeah`):** Synchronized v2.13.0 release state across 1 tracked module/artifact surface(s)
|
||||
> - **Touched Files / Surfaces:** `index.html`
|
||||
> - **Live Verified Ecosystem Metrics (`v2.13.0`):** `6` Repositories • `17` CLI Entrypoints • `20` MCP/REST Tools • `14` URN Resources • `63` Verified Web Routes • `388` KG Nodes / `1,282` Edges • `282` Glossary Entries • `4,943` Offline CMUdict Phonetics • `0` Synthetic Data
|
||||
<!-- HS-COMMIT-STATUS:END -->
|
||||
|
||||
**[Try it live →](https://cypher.hyperdope.com)**
|
||||
A gematria cypher calculator with pre-computed instant matching (`82` ciphers, `231,615` Ingglish-provisioned `db.txt` entries across `db_lite.json` and `db.json`), progressive background hydration, and full whitelabel support via `config.js` at [`https://hyperstitionstud.io/calc/`](https://hyperstitionstud.io/calc/).
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ var optHltSameCipher = false;
|
||||
var alphaHlt = 0.15; // opacity for values that do not match - change value here and in conf_SOM()
|
||||
|
||||
var optAllowPhraseComments = true; // allow phrase comments, text inside [...] is not evaluated
|
||||
var optPrioritizeIngglish = (typeof CALC_CONFIG !== 'undefined' && CALC_CONFIG.prioritizeIngglishMatches) ? true : false; // sort [Ingglish: ...] matches to top of query results
|
||||
var liveDatabaseMode = true; // live database mode
|
||||
|
||||
var dbPageItems = (typeof CALC_CONFIG !== 'undefined' && CALC_CONFIG.resultsPerPage) ? CALC_CONFIG.resultsPerPage : 12;
|
||||
@@ -103,6 +104,7 @@ var calcOptionsArr = [
|
||||
"optNewPhrasesGoFirst",
|
||||
"optShowExtraCiphers",
|
||||
"optAllowPhraseComments",
|
||||
"optPrioritizeIngglish",
|
||||
"liveDatabaseMode",
|
||||
"optLetterWordCount",
|
||||
"optWordBreakdown",
|
||||
@@ -546,6 +548,8 @@ function createOptionsMenu() {
|
||||
|
||||
if (optShowExtraCiphers) SECstate = "checked"; // Show Extra Ciphers
|
||||
if (optAllowPhraseComments) APCstate = "checked"; // Allow Phrase Comments
|
||||
var PIMstate = "";
|
||||
if (optPrioritizeIngglish) PIMstate = "checked"; // Prioritize Ingglish [...]
|
||||
if (liveDatabaseMode) LDMstate = "checked"; // Live Database Mode
|
||||
|
||||
if (optNewPhrasesGoFirst) NPGFstate = "checked"; // New Phrases Go First
|
||||
@@ -586,6 +590,10 @@ function createOptionsMenu() {
|
||||
'<div class="optionElement"><label class="chkLabel ciphCheckboxLabel2">Ignore Comments [...]<input type="checkbox" id="chkbox_APC" onclick="conf_APC()" ' +
|
||||
APCstate +
|
||||
'><span class="custChkBox"></span></label></div>';
|
||||
o +=
|
||||
'<div class="optionElement"><label class="chkLabel ciphCheckboxLabel2">Prioritize Ingglish [...]<input type="checkbox" id="chkbox_PIM" onclick="conf_PIM()" ' +
|
||||
PIMstate +
|
||||
'><span class="custChkBox"></span></label></div>';
|
||||
o +=
|
||||
'<div class="optionElement"><label class="chkLabel ciphCheckboxLabel2">Live Database Mode<input type="checkbox" id="chkbox_LDM" onclick="conf_LDM()" ' +
|
||||
LDMstate +
|
||||
@@ -709,6 +717,16 @@ function conf_APC() {
|
||||
updateTables();
|
||||
}
|
||||
|
||||
function conf_PIM() {
|
||||
// Prioritize Ingglish [...] Matches
|
||||
optPrioritizeIngglish = !optPrioritizeIngglish;
|
||||
var chk = document.getElementById("chkbox_PIM");
|
||||
if (chk !== null) chk.checked = optPrioritizeIngglish;
|
||||
var btn = document.getElementById("queryIngPriorityBtn");
|
||||
if (btn !== null) btn.classList.toggle("ingPriorityOn", optPrioritizeIngglish);
|
||||
refreshOpenQuery();
|
||||
}
|
||||
|
||||
function conf_LWC() {
|
||||
// Letter/Word Count
|
||||
optLetterWordCount = !optLetterWordCount;
|
||||
|
||||
+34
-14
@@ -109,6 +109,31 @@ function clearDatabaseQueryTable() {
|
||||
queryResultInitial = [] // clear
|
||||
}
|
||||
|
||||
function isIngglishEntry(phr) {
|
||||
return typeof phr === "string" && phr.indexOf("[Ingglish:") !== -1
|
||||
}
|
||||
|
||||
function compareQueryMatches(a, b, searchPhrase) {
|
||||
// 1. Exact phrase match (full string or stripped of [...] comment) always first
|
||||
var aRaw = a[1].toLowerCase()
|
||||
var bRaw = b[1].toLowerCase()
|
||||
var aStripped = aRaw.replace(/\[.+\]/g, '').trim()
|
||||
var bStripped = bRaw.replace(/\[.+\]/g, '').trim()
|
||||
var aExact = (aRaw === searchPhrase || aStripped === searchPhrase) ? 1 : 0
|
||||
var bExact = (bRaw === searchPhrase || bStripped === searchPhrase) ? 1 : 0
|
||||
if (aExact !== bExact) return bExact - aExact
|
||||
|
||||
// 2. When optPrioritizeIngglish is enabled, sort [Ingglish: ...] matches above non-Ingglish matches
|
||||
if (typeof optPrioritizeIngglish !== "undefined" && optPrioritizeIngglish) {
|
||||
var aIng = isIngglishEntry(a[1]) ? 1 : 0
|
||||
var bIng = isIngglishEntry(b[1]) ? 1 : 0
|
||||
if (aIng !== bIng) return bIng - aIng
|
||||
}
|
||||
|
||||
// 3. Then sort by match score descending
|
||||
return b[0] - a[0]
|
||||
}
|
||||
|
||||
function searchDBcrossCipher() { // populate "queryResult" array with matching phrases
|
||||
var p, m, n
|
||||
queryResult = [] // reset matching phrases
|
||||
@@ -145,14 +170,10 @@ function searchDBcrossCipher() { // populate "queryResult" array with matching p
|
||||
}
|
||||
if (tmpArr[0] > 0) queryResult.push(tmpArr) // if total score is more than zero, add phrase to array
|
||||
}
|
||||
// Sort by score descending, but pin exact phrase match to top
|
||||
var searchPhrase = sVal().toLowerCase()
|
||||
// Sort by score descending, pinning exact match and (when enabled) [Ingglish: ...] matches to top
|
||||
var searchPhrase = sVal().toLowerCase().trim()
|
||||
queryResult.sort(function(a, b) {
|
||||
// Exact phrase match always first
|
||||
var aExact = a[1].toLowerCase() === searchPhrase ? 1 : 0
|
||||
var bExact = b[1].toLowerCase() === searchPhrase ? 1 : 0
|
||||
if (aExact !== bExact) return bExact - aExact
|
||||
return b[0] - a[0]; // then by score descending
|
||||
return compareQueryMatches(a, b, searchPhrase)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -185,13 +206,10 @@ function searchDBsameCipher() { // populate "queryResult" array with matching ph
|
||||
}
|
||||
if (tmpArr[0] > 0) queryResult.push(tmpArr) // if total score is more than zero, add phrase to array
|
||||
}
|
||||
// Sort by score descending, but pin exact phrase match to top
|
||||
var searchPhrase = sVal().toLowerCase()
|
||||
// Sort by score descending, pinning exact match and (when enabled) [Ingglish: ...] matches to top
|
||||
var searchPhrase = sVal().toLowerCase().trim()
|
||||
queryResult.sort(function(a, b) {
|
||||
var aExact = a[1].toLowerCase() === searchPhrase ? 1 : 0
|
||||
var bExact = b[1].toLowerCase() === searchPhrase ? 1 : 0
|
||||
if (aExact !== bExact) return bExact - aExact
|
||||
return b[0] - a[0];
|
||||
return compareQueryMatches(a, b, searchPhrase)
|
||||
});
|
||||
}
|
||||
|
||||
@@ -267,9 +285,11 @@ function updateDatabaseQueryTable(stPos = 0, dItems, scrollBarEvent = false) { /
|
||||
|
||||
if (firstPhrase) { // open row on the first phrase
|
||||
firstPhrase = false
|
||||
var ingBtnClass = (typeof optPrioritizeIngglish !== "undefined" && optPrioritizeIngglish) ? "queryPageBtn ingPriorityBtn ingPriorityOn" : "queryPageBtn ingPriorityBtn"
|
||||
ms += '<tr class="cH"><td class="mPQ">'
|
||||
ms += queryResult.length.toLocaleString('en')+' matches'
|
||||
ms += '<br><br>'
|
||||
ms += '<br><input class="'+ingBtnClass+'" id="queryIngPriorityBtn" type="button" value="ING ↑" title="Toggle Ingglish [...] priority sort to top" onclick="event.stopPropagation();conf_PIM()">'
|
||||
ms += '<br>'
|
||||
ms += '<div style="display: inline-flex;">'
|
||||
ms += '<input class="queryPageBtn" id="queryPrevPageBtn" type="button" value="<" onclick="queryShowPrevPage()">'
|
||||
ms += '<input id="queryPosInput" type="tel" autocomplete="off" value="'+curPos+'">'
|
||||
|
||||
+50
-101
@@ -29,107 +29,39 @@
|
||||
--font-family: "Montserrat";
|
||||
--font-family-mono: "Roboto Mono";
|
||||
--font-size-body: 95%;
|
||||
--global-hue: 222;
|
||||
--global-sat: 1;
|
||||
--global-lit: 1;
|
||||
--font-hue: 0;
|
||||
--font-sat: 0;
|
||||
--font-lit: 1;
|
||||
--menu-bg-accent: hsl(
|
||||
var(--global-hue) calc(20% * var(--global-sat))
|
||||
calc(28% * var(--global-lit))
|
||||
);
|
||||
--menu-bg-accent2: hsl(
|
||||
var(--global-hue) calc(20% * var(--global-sat))
|
||||
calc(24% * var(--global-lit))
|
||||
);
|
||||
--breakdown-bg-accent: hsl(
|
||||
var(--global-hue) calc(21% * var(--global-sat))
|
||||
calc(13% * var(--global-lit))
|
||||
);
|
||||
--btn-bg-accent: hsl(
|
||||
var(--global-hue) calc(20% * var(--global-sat))
|
||||
calc(22% * var(--global-lit))
|
||||
);
|
||||
--btn-hover-accent: hsl(
|
||||
var(--global-hue) calc(13% * var(--global-sat))
|
||||
calc(33% * var(--global-lit))
|
||||
);
|
||||
--btn-active-accent: hsl(
|
||||
var(--global-hue) calc(13% * var(--global-sat))
|
||||
calc(39% * var(--global-lit))
|
||||
);
|
||||
--body-bg-accent: hsl(
|
||||
var(--global-hue) calc(22% * var(--global-sat))
|
||||
calc(16% * var(--global-lit))
|
||||
);
|
||||
--query-bg-accent: hsl(
|
||||
var(--global-hue) calc(20% * var(--global-sat))
|
||||
calc(19% * var(--global-lit))
|
||||
);
|
||||
--hist-header-gradient: hsl(
|
||||
var(--global-hue) calc(13% * var(--global-sat))
|
||||
calc(10% * var(--global-lit))
|
||||
);
|
||||
--table-row-odd: hsl(
|
||||
var(--global-hue) calc(14% * var(--global-sat))
|
||||
calc(14% * var(--global-lit))
|
||||
);
|
||||
--table-row-even: hsl(
|
||||
var(--global-hue) calc(12% * var(--global-sat))
|
||||
calc(16% * var(--global-lit))
|
||||
);
|
||||
--input-bg-accent: hsl(
|
||||
var(--global-hue) calc(13% * var(--global-sat))
|
||||
calc(13% * var(--global-lit))
|
||||
);
|
||||
--highlight-date: hsla(
|
||||
var(--global-hue) calc(30% * var(--global-sat))
|
||||
calc(85% * var(--global-lit)) / 0.15
|
||||
);
|
||||
--drag-highlight: hsla(
|
||||
var(--global-hue) calc(80% * var(--global-sat)) calc(70% * var(--font-lit)) /
|
||||
0.2
|
||||
);
|
||||
--drag-highlight-border: hsl(
|
||||
var(--global-hue) calc(80% * var(--global-sat)) calc(70% * var(--font-lit))
|
||||
);
|
||||
--placeholder-color: hsl(
|
||||
var(--global-hue) calc(20% * var(--global-sat)) calc(45% * var(--font-lit))
|
||||
);
|
||||
--checkmark-accent: hsl(
|
||||
var(--global-hue) calc(75% * var(--global-sat)) calc(85% * var(--font-lit))
|
||||
);
|
||||
--font-white-1: hsl(
|
||||
var(--font-hue) calc(100% * var(--font-sat)) calc(92% * var(--font-lit))
|
||||
);
|
||||
--font-white-2: hsl(
|
||||
var(--font-hue) calc(100% * var(--font-sat)) calc(82% * var(--font-lit))
|
||||
);
|
||||
--font-white-3: hsl(
|
||||
var(--font-hue) calc(100% * var(--font-sat)) calc(63% * var(--font-lit))
|
||||
);
|
||||
--font-white-4: hsl(
|
||||
var(--font-hue) calc(100% * var(--font-sat)) calc(30% * var(--font-lit))
|
||||
);
|
||||
--border-accent: hsl(
|
||||
var(--font-hue) calc(100% * var(--font-sat)) calc(41% * var(--font-lit))
|
||||
);
|
||||
--separator-accent: hsl(
|
||||
var(--font-hue) calc(100% * var(--font-sat)) calc(50% * var(--font-lit))
|
||||
);
|
||||
--separator-accent2: hsl(
|
||||
var(--font-hue) calc(100% * var(--font-sat)) calc(30% * var(--font-lit))
|
||||
);
|
||||
--border-dark-accent: hsl(
|
||||
var(--font-hue) calc(100% * var(--font-sat)) calc(23% * var(--font-lit))
|
||||
);
|
||||
--focus-outline: hsl(
|
||||
var(--font-hue) calc(100% * var(--font-sat)) calc(75% * var(--font-lit))
|
||||
);
|
||||
--break-val-accent: hsl(
|
||||
var(--font-hue) calc(100% * var(--font-sat)) calc(41% * var(--font-lit))
|
||||
);
|
||||
--global-hue: 220;
|
||||
--global-sat: 1.4;
|
||||
--global-lit: 0.55;
|
||||
--font-hue: 215;
|
||||
--font-sat: 0.25;
|
||||
--font-lit: 0.96;
|
||||
--menu-bg-accent: #182338;
|
||||
--menu-bg-accent2: #111a2e;
|
||||
--breakdown-bg-accent: #070d1b;
|
||||
--btn-bg-accent: #132038;
|
||||
--btn-hover-accent: #192b4b;
|
||||
--btn-active-accent: #223860;
|
||||
--body-bg-accent: #020617;
|
||||
--query-bg-accent: #0c1324;
|
||||
--hist-header-gradient: #070d1b;
|
||||
--table-row-odd: #0c1324;
|
||||
--table-row-even: #111a2e;
|
||||
--input-bg-accent: #070d1b;
|
||||
--highlight-date: rgba(245, 158, 11, 0.16);
|
||||
--drag-highlight: rgba(56, 189, 248, 0.18);
|
||||
--drag-highlight-border: #38bdf8;
|
||||
--placeholder-color: #64748b;
|
||||
--checkmark-accent: #38bdf8;
|
||||
--font-white-1: #f8fafc;
|
||||
--font-white-2: #e2e8f0;
|
||||
--font-white-3: #94a3b8;
|
||||
--font-white-4: #64748b;
|
||||
--border-accent: #26344d;
|
||||
--separator-accent: #334155;
|
||||
--separator-accent2: #1e293b;
|
||||
--border-dark-accent: #182338;
|
||||
--focus-outline: #38bdf8;
|
||||
--break-val-accent: #f59e0b;
|
||||
}
|
||||
|
||||
html,
|
||||
@@ -1636,6 +1568,23 @@ body {
|
||||
border: 1px solid var(--border-dark-accent);
|
||||
padding: 0em 0.35em;
|
||||
}
|
||||
.ingPriorityBtn {
|
||||
font-size: 82%;
|
||||
margin: 0.25em 0;
|
||||
padding: 0.1em 0.45em;
|
||||
cursor: pointer;
|
||||
opacity: 0.65;
|
||||
transition: opacity 0.15s ease, border-color 0.15s ease, color 0.15s ease;
|
||||
}
|
||||
.ingPriorityBtn:hover {
|
||||
opacity: 0.95;
|
||||
}
|
||||
.ingPriorityBtn.ingPriorityOn {
|
||||
opacity: 1;
|
||||
color: var(--border-accent);
|
||||
border-color: var(--border-accent);
|
||||
font-weight: 600;
|
||||
}
|
||||
#queryMinBtn {
|
||||
position: absolute;
|
||||
width: 24px;
|
||||
|
||||
@@ -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,
|
||||
|
||||
|
||||
@@ -143,6 +143,9 @@
|
||||
<div id="HistoryTableArea"></div>
|
||||
</center>
|
||||
</div>
|
||||
<footer id="hsGlobalFooter" style="text-align:center;padding:14px 8px;font-family:'Courier New',monospace;font-size:12px;color:#94a3b8;">
|
||||
<span class="hs-lemur-credit">hyperstitionstud.io/calc v2.13.0 • Made with <span class="hs-heart" role="img" aria-label="love" style="color:#fb7185;display:inline-block;padding:0 2px;">♥</span> by Lemurs.</span>
|
||||
</footer>
|
||||
|
||||
<span id="loadPanel"></span>
|
||||
|
||||
|
||||
Reference in new issue
Block a user