21 lines
624 B
JavaScript
21 lines
624 B
JavaScript
import { DhPathBrowserApp } from "./app.mjs";
|
|
|
|
Hooks.on("init", () => {
|
|
console.log("Daggerheart Path Browser | Initializing module");
|
|
});
|
|
|
|
Hooks.on("renderDaggerheartMenu", (app, html, data) => {
|
|
const button = document.createElement("button");
|
|
button.type = "button";
|
|
button.innerHTML = `<i class="fa-solid fa-code"></i> ${game.i18n.localize("Browse Data Paths")}`;
|
|
button.classList.add("dh-path-browser-btn");
|
|
|
|
button.addEventListener("click", () => {
|
|
new DhPathBrowserApp().render(true);
|
|
});
|
|
|
|
const container = html.querySelector("div");
|
|
if (container) {
|
|
container.appendChild(button);
|
|
}
|
|
});
|