mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Don't change active WI selection on import
This commit is contained in:
@@ -136,7 +136,7 @@ async function loadWorldInfoData(name) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function updateWorldInfoList(importedWorldName) {
|
async function updateWorldInfoList() {
|
||||||
var result = await fetch("/getsettings", {
|
var result = await fetch("/getsettings", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: getRequestHeaders(),
|
headers: getRequestHeaders(),
|
||||||
@@ -153,11 +153,6 @@ async function updateWorldInfoList(importedWorldName) {
|
|||||||
$("#world_info").append(`<option value='${i}'>${item}</option>`);
|
$("#world_info").append(`<option value='${i}'>${item}</option>`);
|
||||||
$("#world_editor_select").append(`<option value='${i}'>${item}</option>`);
|
$("#world_editor_select").append(`<option value='${i}'>${item}</option>`);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (importedWorldName) {
|
|
||||||
const indexOf = world_names.indexOf(world_info);
|
|
||||||
$("#world_info").val(indexOf);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -831,7 +826,7 @@ jQuery(() => {
|
|||||||
processData: false,
|
processData: false,
|
||||||
success: async function (data) {
|
success: async function (data) {
|
||||||
if (data.name) {
|
if (data.name) {
|
||||||
await updateWorldInfoList(data.name);
|
await updateWorldInfoList();
|
||||||
|
|
||||||
const newIndex = world_names.indexOf(data.name);
|
const newIndex = world_names.indexOf(data.name);
|
||||||
if (newIndex >= 0) {
|
if (newIndex >= 0) {
|
||||||
|
Reference in New Issue
Block a user