mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Force open Char WI with Shift
QoL - Force open character WI selector menu if icon clicked with Shift.
This commit is contained in:
@@ -1094,7 +1094,7 @@ function createWorldInfoEntry(name, data) {
|
|||||||
selectiveLogic: 0,
|
selectiveLogic: 0,
|
||||||
addMemo: false,
|
addMemo: false,
|
||||||
order: 100,
|
order: 100,
|
||||||
position: 0,
|
position: 1,
|
||||||
disable: false,
|
disable: false,
|
||||||
excludeRecursion: false,
|
excludeRecursion: false,
|
||||||
probability: 100,
|
probability: 100,
|
||||||
@@ -2086,13 +2086,13 @@ jQuery(() => {
|
|||||||
if (chid) {
|
if (chid) {
|
||||||
const worldName = characters[chid]?.data?.extensions?.world;
|
const worldName = characters[chid]?.data?.extensions?.world;
|
||||||
const hasEmbed = checkEmbeddedWorld(chid);
|
const hasEmbed = checkEmbeddedWorld(chid);
|
||||||
if (worldName && world_names.includes(worldName)) {
|
if (worldName && world_names.includes(worldName) && !event.shiftKey) {
|
||||||
if (!$('#WorldInfo').is(':visible')) {
|
if (!$('#WorldInfo').is(':visible')) {
|
||||||
$('#WIDrawerIcon').trigger('click');
|
$('#WIDrawerIcon').trigger('click');
|
||||||
}
|
}
|
||||||
const index = world_names.indexOf(worldName);
|
const index = world_names.indexOf(worldName);
|
||||||
$("#world_editor_select").val(index).trigger('change');
|
$("#world_editor_select").val(index).trigger('change');
|
||||||
} else if (hasEmbed) {
|
} else if (hasEmbed && !event.shiftKey) {
|
||||||
await importEmbeddedWorldInfo();
|
await importEmbeddedWorldInfo();
|
||||||
saveCharacterDebounced();
|
saveCharacterDebounced();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user