diff --git a/module/characterImporter.js b/module/characterImporter.js index 37120c0e..f48dfa74 100644 --- a/module/characterImporter.js +++ b/module/characterImporter.js @@ -1281,20 +1281,17 @@ export default class CharacterImporter { Actor.create(targetCharacter); } - static addImportButton(){ - console.log("Starting to add Import Character button..."); + static addImportButton(html){ const header = $("#actors").find("header.directory-header"); const search = $("#actors").children().find("div.header-search"); const newImportButtonDiv = $("#actors").children().find("div.header-actions").clone(); const newSearch = search.clone(); - search.remove(); newImportButtonDiv.attr('id', 'character-sheet-import'); header.append(newImportButtonDiv); newImportButtonDiv.children("button").remove(); newImportButtonDiv.append(""); newSearch.appendTo(header); - console.log("Finished adding new button!"); } diff --git a/sw5e.js b/sw5e.js index 6c85f3e4..92a92a67 100644 --- a/sw5e.js +++ b/sw5e.js @@ -42,8 +42,6 @@ import * as migrations from "./module/migration.js"; /* -------------------------------------------- */ Hooks.once("init", function() { - console.log("Enabling Hooks debug"); - CONFIG.debug.hooks = true; console.log(`SW5e | Initializing Star Wars 5th Edition System\n${SW5E.ASCII}`); // Create a SW5E namespace within the game global @@ -217,7 +215,7 @@ Hooks.on("getChatLogEntryContext", chat.addChatMessageContextOptions); Hooks.on("renderChatLog", (app, html, data) => Item5e.chatListeners(html)); Hooks.on("renderChatPopout", (app, html, data) => Item5e.chatListeners(html)); Hooks.on('getActorDirectoryEntryContext', Actor5e.addDirectoryContextOptions); -Hooks.on("renderActorDirectory", CharacterImporter.addImportButton()); +Hooks.on("renderActorDirectory", (app, html, data) => CharacterImporter.addImportButton(html)); // TODO I should remove this Handlebars.registerHelper('getProperty', function (data, property) {