Using a leading debounce on send2chat button
This commit is contained in:
@@ -26,7 +26,13 @@ export class BaseJournalSheetL5r5e extends JournalSheet {
|
||||
label: game.i18n.localize("l5r5e.global.send_to_chat"),
|
||||
class: "send-to-chat",
|
||||
icon: "fas fa-comment-dots",
|
||||
onclick: async () => game.l5r5e.HelpersL5r5e.sendToChat(this.object),
|
||||
onclick: () =>
|
||||
game.l5r5e.HelpersL5r5e.debounce(
|
||||
"send2chat-" + this.object.id,
|
||||
() => game.l5r5e.HelpersL5r5e.sendToChat(this.object),
|
||||
2000,
|
||||
true
|
||||
)(),
|
||||
});
|
||||
|
||||
return buttons;
|
||||
|
||||
Reference in New Issue
Block a user