Fix display help links
This commit is contained in:
parent
32e5566a37
commit
c124fc589f
|
@ -364,10 +364,10 @@ const system_messages = {
|
||||||
mes:
|
mes:
|
||||||
`Hello there! Please select the help topic you would like to learn more about:
|
`Hello there! Please select the help topic you would like to learn more about:
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="javascript:displayHelp('1')">Slash Commands</a> (or <tt>/help slash</tt>)</li>
|
<li><a href="#" data-displayHelp="1">Slash Commands</a> (or <tt>/help slash</tt>)</li>
|
||||||
<li><a href="javascript:displayHelp('2')">Formatting</a> (or <tt>/help format</tt>)</li>
|
<li><a href="#" data-displayHelp="2">Formatting</a> (or <tt>/help format</tt>)</li>
|
||||||
<li><a href="javascript:displayHelp('3')">Hotkeys</a> (or <tt>/help hotkeys</tt>)</li>
|
<li><a href="#" data-displayHelp="3">Hotkeys</a> (or <tt>/help hotkeys</tt>)</li>
|
||||||
<li><a href="javascript:displayHelp('4')">{{Macros}}</a> (or <tt>/help macros</tt>)</li>
|
<li><a href="#" data-displayHelp="4">{{Macros}}</a> (or <tt>/help macros</tt>)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br><b>Still got questions left? The <a target="_blank" href="https://docs.sillytavern.app/">Official SillyTavern Documentation Website</a> has much more information!</b>`
|
<br><b>Still got questions left? The <a target="_blank" href="https://docs.sillytavern.app/">Official SillyTavern Documentation Website</a> has much more information!</b>`
|
||||||
},
|
},
|
||||||
|
|
|
@ -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) {
|
function setBackgroundCallback(_, bg) {
|
||||||
if (!bg) {
|
if (!bg) {
|
||||||
|
|
Loading…
Reference in New Issue