From 409eef6e4635c66a88c0d6660d9fb35ae3c8e803 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 25 Aug 2023 23:48:59 +0300 Subject: [PATCH] Extract expressions HTML to templates --- .../scripts/extensions/expressions/index.js | 68 ++----------------- .../extensions/expressions/list-item.html | 12 ++++ .../extensions/expressions/settings.html | 44 ++++++++++++ 3 files changed, 60 insertions(+), 64 deletions(-) create mode 100644 public/scripts/extensions/expressions/list-item.html create mode 100644 public/scripts/extensions/expressions/settings.html diff --git a/public/scripts/extensions/expressions/index.js b/public/scripts/extensions/expressions/index.js index 1add1170d..bdc3da7e3 100644 --- a/public/scripts/extensions/expressions/index.js +++ b/public/scripts/extensions/expressions/index.js @@ -1,6 +1,6 @@ import { callPopup, eventSource, event_types, getRequestHeaders, saveSettingsDebounced } from "../../../script.js"; import { dragElement, isMobile } from "../../RossAscends-mods.js"; -import { getContext, getApiUrl, modules, extension_settings, ModuleWorkerWrapper, doExtrasFetch } from "../../extensions.js"; +import { getContext, getApiUrl, modules, extension_settings, ModuleWorkerWrapper, doExtrasFetch, renderExtensionTemplate } from "../../extensions.js"; import { loadMovingUIState, power_user } from "../../power-user.js"; import { onlyUnique, debounce, getCharaFilename } from "../../utils.js"; export { MODULE_NAME }; @@ -800,20 +800,7 @@ function drawSpritesList(character, labels, sprites) { } function getListItem(item, imageSrc, textClass) { - return ` -
Hint: Create new folder in the public/characters/ folder and name it as the name of the character. - Put images with expressions there. File names should follow the pattern: [expression_label].[image_format]
-Hint: Create new folder in the public/characters/ folder and name it as the name of the character. + Put images with expressions there. File names should follow the pattern: [expression_label].[image_format]
+