From ef68dd07ac4d511fa9f4f95ac0bffe93d3b5b9b0 Mon Sep 17 00:00:00 2001 From: IkariDevGIT Date: Thu, 7 Sep 2023 16:02:34 +0200 Subject: [PATCH] Add command for opening the gallery --- public/scripts/extensions/gallery/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/public/scripts/extensions/gallery/index.js b/public/scripts/extensions/gallery/index.js index 4bdde9453..11f3dd4ff 100644 --- a/public/scripts/extensions/gallery/index.js +++ b/public/scripts/extensions/gallery/index.js @@ -7,7 +7,8 @@ import { import { selected_group } from "../../group-chats.js"; import { loadFileToDocument } from "../../utils.js"; import { loadMovingUIState } from '../../power-user.js'; -import { dragElement } from '../../RossAscends-mods.js' +import { dragElement } from '../../RossAscends-mods.js'; +import { registerSlashCommand } from "../../slash-commands.js"; const extensionName = "gallery"; const extensionFolderPath = `scripts/extensions/${extensionName}/`; @@ -386,3 +387,10 @@ function viewWithDragbox(items) { } } + +// Registers a simple command for opening the char gallery. +registerSlashCommand("show-gallery", showGalleryCommand, ["sg"], "Shows the gallery", true, true); + +function showGalleryCommand(args) { + showCharGallery(); +}