displayName hex in JSON tab

This commit is contained in:
Natsumi
2026-01-08 23:44:47 +13:00
parent 548866f2f8
commit 2f3e57cd01
6 changed files with 27 additions and 6 deletions

View File

@@ -34,7 +34,7 @@ function textToHex(text) {
const s = String(text);
return s
.split('')
.map((c) => c.charCodeAt(0).toString(16))
.map((c) => c.charCodeAt(0).toString(16).toUpperCase())
.join(' ');
}

View File

@@ -321,6 +321,13 @@ function buildTreeData(json) {
node.sort(function (a, b) {
const A = String(a.key).toUpperCase();
const B = String(b.key).toUpperCase();
// sort _ to top
if (A.startsWith('_') && !B.startsWith('_')) {
return -1;
}
if (B.startsWith('_') && !A.startsWith('_')) {
return 1;
}
if (A < B) {
return -1;
}