|
@@ -1017,7 +1017,7 @@ let varvCcmWired = false;
|
|
|
function initVarvCcmButtons() {
|
|
function initVarvCcmButtons() {
|
|
|
if (varvCcmWired) return;
|
|
if (varvCcmWired) return;
|
|
|
document.querySelectorAll("[data-ref]").forEach((btn) => {
|
|
document.querySelectorAll("[data-ref]").forEach((btn) => {
|
|
|
- btn.addEventListener("click", () => captureVarvRef(btn.dataset.ref, btn.dataset.hex));
|
|
|
|
|
|
|
+ btn.addEventListener("click", () => captureVarvRef(String(btn.dataset.hex).toLowerCase(), btn.dataset.hex));
|
|
|
});
|
|
});
|
|
|
const fit = document.getElementById("varv-ccm-fit");
|
|
const fit = document.getElementById("varv-ccm-fit");
|
|
|
if (fit) fit.addEventListener("click", fitVarvCcm);
|
|
if (fit) fit.addEventListener("click", fitVarvCcm);
|
|
@@ -1038,7 +1038,7 @@ function initVarvCcmButtons() {
|
|
|
if (capEl) capEl.addEventListener("click", () => {
|
|
if (capEl) capEl.addEventListener("click", () => {
|
|
|
const h = (hexEl ? hexEl.value : "").replace("#", "").trim().toUpperCase();
|
|
const h = (hexEl ? hexEl.value : "").replace("#", "").trim().toUpperCase();
|
|
|
if (!/^[0-9A-F]{6}$/.test(h)) return;
|
|
if (!/^[0-9A-F]{6}$/.test(h)) return;
|
|
|
- captureVarvRef("c" + h.toLowerCase(), h);
|
|
|
|
|
|
|
+ captureVarvRef(h.toLowerCase(), h);
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
varvCcmWired = true;
|
|
varvCcmWired = true;
|