added changes are optional

This commit is contained in:
Bruno FS
2023-04-28 12:50:05 -03:00
parent 2739ea0389
commit cee92cddf3

View File

@ -440,6 +440,8 @@ let novel_tier;
let novelai_settings;
let novelai_setting_names;
let scrollChatToBottomAuto = true;
let autoFixGeneratedTextMarkdown = true;
//css
var bg1_toggle = true; // inits the BG as BG1
var css_mes_bg = $('<div class="mes"></div>').css("background");
@ -1068,8 +1070,10 @@ function addOneMessage(mes, { type = "normal", insertAfter = null, scroll = true
}
function scrollChatToBottom() {
// var $textchat = $("#chat");
// $textchat.scrollTop(($textchat[0].scrollHeight));
if (scrollChatToBottomAuto) {
var $textchat = $("#chat");
$textchat.scrollTop(($textchat[0].scrollHeight));
}
}
function substituteParams(content, _name1, _name2) {
@ -2873,6 +2877,12 @@ async function getSettings(type) {
// Load- character tags
loadTagsSettings(settings);
// Others, TODO: move to power user settings
if (settings.scrollChatToBottomAuto !== undefined)
scrollChatToBottomAuto = !!settings.scrollChatToBottomAuto;
if (settings.autoFixGeneratedTextMarkdown !== undefined)
autoFixGeneratedTextMarkdown = !!settings.autoFixGeneratedTextMarkdown;
//Enable GUI deference settings if GUI is selected for Kobold
if (main_api === "kobold") {
}