mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Removed unneeded IF
This commit is contained in:
@ -504,7 +504,7 @@ async function moduleWorker() {
|
||||
//set checkbox to global var
|
||||
$('#image_type_toggle').prop('checked', extension_settings.expressions.live2d);
|
||||
if(extension_settings.expressions.live2d == true){
|
||||
live2d(extension_settings.expressions.live2d);
|
||||
setLive2dState(extension_settings.expressions.live2d);
|
||||
}
|
||||
}
|
||||
|
||||
@ -610,7 +610,7 @@ async function moduleWorker() {
|
||||
}
|
||||
}
|
||||
|
||||
function live2d(switch_var){
|
||||
function setLive2dState(switch_var){
|
||||
extension_settings.expressions.live2d = switch_var; // Store setting
|
||||
saveSettingsDebounced();
|
||||
|
||||
@ -916,8 +916,6 @@ async function setExpression(character, expression, force) {
|
||||
document.getElementById("expression-holder").style.display = '';
|
||||
|
||||
} else {
|
||||
|
||||
if (extension_settings.expressions.live2d == true) {
|
||||
// Find the <img> element with id="expression-image" and class="expression"
|
||||
const imgElement = document.querySelector('img#expression-image.expression');
|
||||
//console.log("searching");
|
||||
@ -927,7 +925,6 @@ async function setExpression(character, expression, force) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onClickExpressionImage() {
|
||||
// online mode doesn't need force set
|
||||
@ -1237,7 +1234,7 @@ function setExpressionOverrideHtml(forceClear = false) {
|
||||
$('.expression_settings').hide();
|
||||
|
||||
$('#image_type_toggle').on('click', function () {
|
||||
live2d(this.checked);
|
||||
setLive2dState(this.checked);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user