refactor: deduplicate HEX64_REGEX to js/utils/hex.js

Moves the repeatedly defined HEX64_REGEX constant to a shared utility
module to improve maintainability and consistency. Updates all consumers
to import from the new location.

Signed-off-by: Jules <[email protected]>

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-07 21:52:51 +00:00
1 parent 22fcc97672
commit a084bb59de
23 files changed
+43 -23

No files matched your search

+2 -1
View File
@@ -6,6 +6,7 @@ import { resolveVideoPointer } from "./utils/videoPointer.js";
import { devLogger, userLogger } from "./utils/logger.js";
import { nostrToolsReady } from "./nostrToolsBootstrap.js";
import { THEME_ACCENT_OVERRIDES } from "../config/instance-config.js";
import { HEX64_REGEX } from "./utils/hex.js";
// Set accent color from instance config
try {
@@ -51,7 +52,7 @@ const diagPromise = embedDebugEnabled
const POINTER_PARAM = "pointer";
const PLAYBACK_PARAM = "playback";
const HEX64_REGEX = /^[0-9a-f]{64}$/i;
const statusEl = document.getElementById("embedStatus");
const videoEl = document.getElementById("embedVideo");