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) {