Merge pull request #1112 from IkariDevGIT/gallerycommand

Add command for opening the gallery
This commit is contained in:
Cohee 2023-09-08 10:44:57 +03:00 committed by GitHub
commit 408a1fe846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -7,7 +7,8 @@ import {
import { selected_group } from "../../group-chats.js"; import { selected_group } from "../../group-chats.js";
import { loadFileToDocument } from "../../utils.js"; import { loadFileToDocument } from "../../utils.js";
import { loadMovingUIState } from '../../power-user.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 extensionName = "gallery";
const extensionFolderPath = `scripts/extensions/${extensionName}/`; 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();
}