Force open Char WI with Shift

QoL - Force open character WI selector menu if icon clicked with Shift.
This commit is contained in:
valden80 2023-10-17 03:10:57 +03:00 committed by GitHub
parent eaadb1c5c2
commit 819b92a1d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1094,7 +1094,7 @@ function createWorldInfoEntry(name, data) {
selectiveLogic: 0,
addMemo: false,
order: 100,
position: 0,
position: 1,
disable: false,
excludeRecursion: false,
probability: 100,
@ -2086,13 +2086,13 @@ jQuery(() => {
if (chid) {
const worldName = characters[chid]?.data?.extensions?.world;
const hasEmbed = checkEmbeddedWorld(chid);
if (worldName && world_names.includes(worldName)) {
if (worldName && world_names.includes(worldName) && !event.shiftKey) {
if (!$('#WorldInfo').is(':visible')) {
$('#WIDrawerIcon').trigger('click');
}
const index = world_names.indexOf(worldName);
$("#world_editor_select").val(index).trigger('change');
} else if (hasEmbed) {
} else if (hasEmbed && !event.shiftKey) {
await importEmbeddedWorldInfo();
saveCharacterDebounced();
}