This commit is contained in:
Cohee
2024-01-01 16:07:21 +02:00
parent 213ff4b89a
commit 30732ada32
6 changed files with 8 additions and 8 deletions

View File

@ -275,7 +275,7 @@ DOMPurify.addHook('afterSanitizeAttributes', function (node) {
} }
}); });
DOMPurify.addHook("uponSanitizeAttribute", (_, data, config) => { DOMPurify.addHook('uponSanitizeAttribute', (_, data, config) => {
if (!config['MESSAGE_SANITIZE']) { if (!config['MESSAGE_SANITIZE']) {
return; return;
} }
@ -287,7 +287,7 @@ DOMPurify.addHook("uponSanitizeAttribute", (_, data, config) => {
return v; return v;
} }
return "custom-" + v; return 'custom-' + v;
}).join(' '); }).join(' ');
} }
break; break;

View File

@ -1381,7 +1381,7 @@ class PromptManager {
footerDiv.querySelector('.menu_button:last-child').addEventListener('click', this.handleNewPrompt); footerDiv.querySelector('.menu_button:last-child').addEventListener('click', this.handleNewPrompt);
// Add prompt export dialogue and options // Add prompt export dialogue and options
const exportForCharacter =` const exportForCharacter = `
<div class="row"> <div class="row">
<a class="export-promptmanager-prompts-character list-group-item" data-i18n="Export for character">Export for character</a> <a class="export-promptmanager-prompts-character list-group-item" data-i18n="Export for character">Export for character</a>
<span class="tooltip fa-solid fa-info-circle" title="Export prompts for this character, including their order."></span> <span class="tooltip fa-solid fa-info-circle" title="Export prompts for this character, including their order."></span>

View File

@ -1504,5 +1504,5 @@ function setExpressionOverrideHtml(forceClear = false) {
eventSource.on(event_types.GROUP_UPDATED, updateVisualNovelModeDebounced); eventSource.on(event_types.GROUP_UPDATED, updateVisualNovelModeDebounced);
registerSlashCommand('sprite', setSpriteSlashCommand, ['emote'], '<span class="monospace">(spriteId)</span> force sets the sprite for the current character', true, true); registerSlashCommand('sprite', setSpriteSlashCommand, ['emote'], '<span class="monospace">(spriteId)</span> force sets the sprite for the current character', true, true);
registerSlashCommand('spriteoverride', setSpriteSetCommand, ['costume'], '<span class="monospace">(optional folder)</span> sets an override sprite folder for the current character. If the name starts with a slash or a backslash, selects a sub-folder in the character-named folder. Empty value to reset to default.', true, true); registerSlashCommand('spriteoverride', setSpriteSetCommand, ['costume'], '<span class="monospace">(optional folder)</span> sets an override sprite folder for the current character. If the name starts with a slash or a backslash, selects a sub-folder in the character-named folder. Empty value to reset to default.', true, true);
registerSlashCommand('lastsprite', (_, value)=>lastExpression[value.trim()] ?? '', [], '<span class="monospace">(charName)</span> Returns the last set sprite / expression for the named character.', true, true); registerSlashCommand('lastsprite', (_, value) => lastExpression[value.trim()] ?? '', [], '<span class="monospace">(charName)</span> Returns the last set sprite / expression for the named character.', true, true);
})(); })();

View File

@ -801,7 +801,7 @@ async function qrDeleteCallback(args, label) {
if (idx === -1) { if (idx === -1) {
toastr.warning('Confirm you are using proper case sensitivity!', `QR with label '${label}' not found`); toastr.warning('Confirm you are using proper case sensitivity!', `QR with label '${label}' not found`);
return ''; return '';
}; }
preset.quickReplySlots.splice(idx, 1); preset.quickReplySlots.splice(idx, 1);
preset.numberOfSlots--; preset.numberOfSlots--;
await fetch('/savequickreply', { await fetch('/savequickreply', {

View File

@ -2642,7 +2642,7 @@ $('#sd_dropdown [id]').on('click', function () {
jQuery(async () => { jQuery(async () => {
registerSlashCommand('imagine', generatePicture, ['sd', 'img', 'image'], helpString, true, true); registerSlashCommand('imagine', generatePicture, ['sd', 'img', 'image'], helpString, true, true);
registerSlashCommand('imagine-comfy-workflow', changeComfyWorkflow, ['icw'], '(workflowName) - change the workflow to be used for image generation with ComfyUI, e.g. <tt>/imagine-comfy-workflow MyWorkflow</tt>') registerSlashCommand('imagine-comfy-workflow', changeComfyWorkflow, ['icw'], '(workflowName) - change the workflow to be used for image generation with ComfyUI, e.g. <tt>/imagine-comfy-workflow MyWorkflow</tt>');
$('#extensions_settings').append(renderExtensionTemplate('stable-diffusion', 'settings', defaultSettings)); $('#extensions_settings').append(renderExtensionTemplate('stable-diffusion', 'settings', defaultSettings));
$('#sd_source').on('change', onSourceChange); $('#sd_source').on('change', onSourceChange);

View File

@ -310,12 +310,12 @@ class CoquiTtsProvider {
modelDict = coquiApiModelsFull; modelDict = coquiApiModelsFull;
if (model_setting_language == null & 'languages' in modelDict[model_language][model_dataset][model_label]) { if (model_setting_language == null & 'languages' in modelDict[model_language][model_dataset][model_label]) {
toastr.error('Model language not selected, please select one.', DEBUG_PREFIX+' voice mapping model language', { timeOut: 10000, extendedTimeOut: 20000, preventDuplicates: true }); toastr.error('Model language not selected, please select one.', DEBUG_PREFIX + ' voice mapping model language', { timeOut: 10000, extendedTimeOut: 20000, preventDuplicates: true });
return; return;
} }
if (model_setting_speaker == null & 'speakers' in modelDict[model_language][model_dataset][model_label]) { if (model_setting_speaker == null & 'speakers' in modelDict[model_language][model_dataset][model_label]) {
toastr.error('Model speaker not selected, please select one.', DEBUG_PREFIX+' voice mapping model speaker', { timeOut: 10000, extendedTimeOut: 20000, preventDuplicates: true }); toastr.error('Model speaker not selected, please select one.', DEBUG_PREFIX + ' voice mapping model speaker', { timeOut: 10000, extendedTimeOut: 20000, preventDuplicates: true });
return; return;
} }