initial commit
This commit is contained in:
commit
4ebe86ee8c
8 changed files with 1006 additions and 0 deletions
18
scripts/module.js
Normal file
18
scripts/module.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { DHImporterApp } from "./app.js";
|
||||
|
||||
Hooks.once("init", async () => {
|
||||
await loadTemplates([
|
||||
"modules/dh-importer/templates/preview.hbs"
|
||||
]);
|
||||
});
|
||||
|
||||
Hooks.on("renderActorDirectory", (app, html, data) => {
|
||||
const $html = $(html);
|
||||
const button = $(`<button class="dh-importer-btn"><i class="fas fa-file-import"></i> Import Statblocks</button>`);
|
||||
|
||||
button.on("click", () => {
|
||||
new DHImporterApp().render({ force: true });
|
||||
});
|
||||
|
||||
$html.find(".directory-header .header-actions").append(button);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue