Add token counters for individual fields. Optimize total counter display

This commit is contained in:
Cohee
2023-08-21 15:32:27 +03:00
parent f9573eb45d
commit c735bf546a
6 changed files with 77 additions and 107 deletions

View File

@ -1,5 +1,5 @@
// statsHelper.js
import { getRequestHeaders, callPopup, token, chat } from "../script.js";
import { getRequestHeaders, callPopup, characters, this_chid } from "../script.js";
import { humanizeGenTime } from "./RossAscends-mods.js";
let charStats = {};
@ -304,4 +304,10 @@ async function statMesProcess(line, type, characters, this_chid, oldMesssage) {
updateStats();
}
jQuery(() => {
$(".rm_stats_button").on('click', function () {
characterStatsHandler(characters, this_chid);
});
})
export { userStatsHandler, characterStatsHandler, getStats, statMesProcess, charStats };