From c124fc589f57e436d7f4acc001ccf415c72cd61a Mon Sep 17 00:00:00 2001 From: Cohee1207 Date: Mon, 7 Aug 2023 22:21:10 +0300 Subject: [PATCH] Fix display help links --- public/script.js | 8 ++++---- public/scripts/slash-commands.js | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/public/script.js b/public/script.js index 1d0dc97a2..f037de1c5 100644 --- a/public/script.js +++ b/public/script.js @@ -364,10 +364,10 @@ const system_messages = { mes: `Hello there! Please select the help topic you would like to learn more about:
Still got questions left? The Official SillyTavern Documentation Website has much more information!` }, diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index ebd801f0b..aae5fc9e9 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -423,7 +423,11 @@ function helpCommandCallback(_, type) { } } -window['displayHelp'] = (page) => helpCommandCallback(null, page); +$(document).on('click', '[data-displayHelp]', function (e) { + e.preventDefault(); + const page = String($(this).data('displayhelp')); + helpCommandCallback(null, page); +}); function setBackgroundCallback(_, bg) { if (!bg) {