精简若干功能,优化slug生成规则

This commit is contained in:
Vaica committed 2026-06-02 11:43:58 +08:00
1 parent 2c6bd1c964
commit 791be8bd4f
15 files changed
+76 -41

No files matched your search

+2 -2
View File
@@ -58,13 +58,13 @@ async function main() {
}
});
// Pick one random greeting per time slot, fall back to generic pool
// Keep all greetings per time slot (frontend picks randomly)
var timeGreetings = {};
timeKeys.forEach(function(key) {
var list = byTime[key];
if (list.length === 0) list = generic;
if (list.length > 0) {
timeGreetings[key] = list[Math.floor(Math.random() * list.length)];
timeGreetings[key] = list;
}
});