mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 13:11:08 +01:00
Adding suggestions from reviewer
This commit is contained in:
parent
f131dc4ec0
commit
5f45609656
2 changed files with 4 additions and 8 deletions
|
|
@ -193,11 +193,9 @@ Hooks.on('ready', async () => {
|
||||||
|
|
||||||
Hooks.once('dicesoniceready', () => {});
|
Hooks.once('dicesoniceready', () => {});
|
||||||
|
|
||||||
Hooks.on('renderChatMessageHTML', (app, element, _) => {
|
Hooks.on('renderChatMessageHTML', (document, element) => {
|
||||||
enricherRenderSetup(element);
|
enricherRenderSetup(element);
|
||||||
// Despite documentation, the third parameter may be empty as per
|
const cssClass = document.flags?.daggerheart?.cssClass;
|
||||||
// https://github.com/foundryvtt/foundryvtt/issues/11984
|
|
||||||
const cssClass = app.flags?.daggerheart?.cssClass;
|
|
||||||
if (cssClass) cssClass.split(' ').forEach(cls => element.classList.add(cls));
|
if (cssClass) cssClass.split(' ').forEach(cls => element.classList.add(cls));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,10 +55,8 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
addChatListeners = async (app, html, data) => {
|
addChatListeners = async (document, html, data) => {
|
||||||
// Despite documentation, the third parameter may be empty as per
|
const message = data?.message ?? document.toObject(false);
|
||||||
// https://github.com/foundryvtt/foundryvtt/issues/11984
|
|
||||||
const message = data?.message ?? app.toObject(false);
|
|
||||||
html.querySelectorAll('.simple-roll-button').forEach(element =>
|
html.querySelectorAll('.simple-roll-button').forEach(element =>
|
||||||
element.addEventListener('click', event => this.onRollSimple(event, message))
|
element.addEventListener('click', event => this.onRollSimple(event, message))
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue