From 075ce5f66296f398f35c3907026a772603971faa Mon Sep 17 00:00:00 2001 From: Vlyan Date: Sat, 23 Jul 2022 22:04:48 +0200 Subject: [PATCH] Working on Compatibility for FVTT v10 SendToChat : Fix compendium-link --- system/scripts/hooks.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/system/scripts/hooks.js b/system/scripts/hooks.js index b10c494..0025bb2 100644 --- a/system/scripts/hooks.js +++ b/system/scripts/hooks.js @@ -87,6 +87,17 @@ export default class HooksL5r5e { html.find(".gm-only").remove(); } } + + // Compendium folder link + html.find(".compendium-link").on("click", (event) => { + const packId = $(event.currentTarget).data("pack"); + if (packId) { + const pack = game.packs.get(packId); + if (pack) { + pack.render(true); + } + } + }); } /**