mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Reformat new code
This commit is contained in:
@ -882,7 +882,8 @@ async function setExpression(character, expression, force) {
|
|||||||
if (imgElement) {
|
if (imgElement) {
|
||||||
console.log("setting value");
|
console.log("setting value");
|
||||||
imgElement.src = getApiUrl() + '/api/live2d/result_feed';
|
imgElement.src = getApiUrl() + '/api/live2d/result_feed';
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1205,7 +1206,6 @@ function setExpressionOverrideHtml(forceClear = false) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
addExpressionImage();
|
addExpressionImage();
|
||||||
addVisualNovelMode();
|
addVisualNovelMode();
|
||||||
addSettings();
|
addSettings();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { callPopup, cancelTtsPlay, eventSource, event_types, isMultigenEnabled, is_send_press, saveSettingsDebounced } from '../../../script.js'
|
import { callPopup, cancelTtsPlay, eventSource, event_types, isMultigenEnabled, is_send_press, saveSettingsDebounced } from '../../../script.js'
|
||||||
import { ModuleWorkerWrapper, extension_settings, getContext } from '../../extensions.js'
|
import { ModuleWorkerWrapper, doExtrasFetch, extension_settings, getApiUrl, getContext } from '../../extensions.js'
|
||||||
import { escapeRegex, getStringHash } from '../../utils.js'
|
import { escapeRegex, getStringHash } from '../../utils.js'
|
||||||
import { EdgeTtsProvider } from './edge.js'
|
import { EdgeTtsProvider } from './edge.js'
|
||||||
import { ElevenLabsTtsProvider } from './elevenlabs.js'
|
import { ElevenLabsTtsProvider } from './elevenlabs.js'
|
||||||
@ -7,7 +7,6 @@ import { SileroTtsProvider } from './silerotts.js'
|
|||||||
import { CoquiTtsProvider } from './coquitts.js'
|
import { CoquiTtsProvider } from './coquitts.js'
|
||||||
import { SystemTtsProvider } from './system.js'
|
import { SystemTtsProvider } from './system.js'
|
||||||
import { NovelTtsProvider } from './novel.js'
|
import { NovelTtsProvider } from './novel.js'
|
||||||
import { isMobile } from '../../RossAscends-mods.js'
|
|
||||||
import { power_user } from '../../power-user.js'
|
import { power_user } from '../../power-user.js'
|
||||||
|
|
||||||
const UPDATE_INTERVAL = 1000
|
const UPDATE_INTERVAL = 1000
|
||||||
@ -165,13 +164,13 @@ async function moduleWorker() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function talkingAnimation(switchValue) {
|
function talkingAnimation(switchValue) {
|
||||||
const apiKeyValue = document.getElementById("extensions_url").value;
|
const apiUrl = getApiUrl();
|
||||||
const animationType = switchValue ? "start" : "stop";
|
const animationType = switchValue ? "start" : "stop";
|
||||||
|
|
||||||
if (switchValue !== storedvalue) {
|
if (switchValue !== storedvalue) {
|
||||||
try {
|
try {
|
||||||
console.log(animationType + " Talking Animation");
|
console.log(animationType + " Talking Animation");
|
||||||
fetch(`${apiKeyValue}/api/live2d/${animationType}_talking`);
|
doExtrasFetch(`${apiUrl}/api/live2d/${animationType}_talking`);
|
||||||
storedvalue = switchValue; // Update the storedvalue to the current switchValue
|
storedvalue = switchValue; // Update the storedvalue to the current switchValue
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Handle the error here or simply ignore it to prevent logging
|
// Handle the error here or simply ignore it to prevent logging
|
||||||
|
Reference in New Issue
Block a user