From 585c94718e0794ffc219431c6b32212559ca55a7 Mon Sep 17 00:00:00 2001 From: Anthony Correa Date: Thu, 27 Jun 2024 14:19:42 -0500 Subject: [PATCH] support for title case --- src/module.json | 8 ++++---- src/scripts/main.js | 4 ++++ src/templates/suggestion-list-content.hbs | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/module.json b/src/module.json index 8bf9e2c..e13dc02 100644 --- a/src/module.json +++ b/src/module.json @@ -7,10 +7,10 @@ "name": "lmxsdl" } ], - "version": "0.2", + "version": "0.3", "compatibility": { - "minimum": "10", - "verified": "11" + "minimum": "11", + "verified": ["11","12"] }, "languages": [ { @@ -19,7 +19,7 @@ "path": "lang/en.json" } ], - "download": "https://gitea.ascorrea.com/asc/asc-session-title-suggestions/releases/download/0.2/module.zip", + "download": "https://gitea.ascorrea.com/asc/asc-session-title-suggestions/releases/download/0.3/module.zip", "manifest": "https://gitea.ascorrea.com/asc/asc-session-title-suggestions/releases/download/latest/module.json", "scripts": [ "scripts/main.js" diff --git a/src/scripts/main.js b/src/scripts/main.js index c145084..5b36e31 100644 --- a/src/scripts/main.js +++ b/src/scripts/main.js @@ -1,3 +1,5 @@ + + const NAME = "/title" const template_path = "modules/asc-session-title-suggestions/templates" @@ -115,6 +117,8 @@ Hooks.on("init", function() { }, hint: game.i18n.localize("SESSION_TITLE_SUGGESTIONS.SETTING_ROLE_HINT") }); + import ('https://cdn.jsdelivr.net/npm/title-case@4.3.1/dist/index.min.js') + .then((module)=>{console.log('asc','loading...');Handlebars.registerHelper("titlecase", module.titleCase)}) }); Hooks.on("ready", function() { diff --git a/src/templates/suggestion-list-content.hbs b/src/templates/suggestion-list-content.hbs index 48cb8ce..44c6f70 100644 --- a/src/templates/suggestion-list-content.hbs +++ b/src/templates/suggestion-list-content.hbs @@ -1,3 +1,3 @@ \ No newline at end of file