Fix apv2, WIP

This commit is contained in:
2026-06-06 10:21:24 +02:00
parent 6cec1da910
commit 9b77a0c552
130 changed files with 12850 additions and 2830 deletions
+5 -5
View File
@@ -38,16 +38,16 @@ export const registerHooks = function () {
});
Hooks.on('renderChatMessage', async (message, html, data) => {
let rerollTitle = html[0].querySelector(".reroll-fromroll h4");
Hooks.on('renderChatMessageHTML', async (message, html, data) => {
let rerollTitle = html.querySelector(".reroll-fromroll h4");
if (rerollTitle) {
rerollTitle.addEventListener("click", () => { html[0].querySelector(".reroll").classList.toggle('visible') })
rerollTitle.addEventListener("click", () => { html.querySelector(".reroll").classList.toggle('visible') })
}
if (message.author?._id != game.user._id || !game.user.isGM) {
// désactiver les inputs pour les joueurs non-auteurs du message
html[0].querySelectorAll("input").forEach(inp => inp.disabled = true);
html.querySelectorAll("input").forEach(inp => inp.disabled = true);
//cacher le boutton reroll
html[0].querySelectorAll("div.reroll-from-effort").forEach(el => el.style.display = "none")
html.querySelectorAll("div.reroll-from-effort").forEach(el => el.style.display = "none")
return
}
await VermineUtils.chatListenners(html)