All user data for FoundryVTT. Includes worlds, systems, modules, and any asset in the "foundryuserdata" directory. Does NOT include the FoundryVTT installation itself.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.2 KiB

  1. import * as util from "../util.js";
  2. import { AvatarSettings } from "./avatar-settings.js";
  3. import { HidingSettings } from "./hiding-settings.js";
  4. import { MovingSettings } from "./moving-settings.js";
  5. import { OtherSettings } from "./other-settings.js";
  6. function injectCSS(filename) {
  7. const head = document.getElementsByTagName("head")[0];
  8. const mainCss = document.createElement("link");
  9. mainCss.setAttribute("rel", "stylesheet");
  10. mainCss.setAttribute("type", "text/css");
  11. mainCss.setAttribute("href", "modules/pf2e-dorako-ux/styles/" + filename + ".css");
  12. mainCss.setAttribute("media", "all");
  13. head.insertBefore(mainCss, head.lastChild);
  14. }
  15. export function refreshChat() {
  16. if (game.messages.size > 100) {
  17. return ui.notifications.warn(game.i18n.localize("pf2e-dorako-ux.text.large-chatlog-warning"));
  18. }
  19. const messages = game.messages.filter((m) => m instanceof ChatMessage);
  20. for (const message of messages) {
  21. ui.chat.updateMessage(message);
  22. }
  23. }
  24. Hooks.once("init", async () => {
  25. util.debug("init");
  26. AvatarSettings.registerSettings();
  27. HidingSettings.registerSettings();
  28. MovingSettings.registerSettings();
  29. OtherSettings.registerSettings();
  30. util.debug("registered settings");
  31. util.debug("initialized properties");
  32. });