mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
smarter WI entry mass expander/collapser
This commit is contained in:
@ -1865,6 +1865,7 @@
|
|||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div id="OpenAllWIEntries" class="menu_button fa-solid fa-expand"></div>
|
<div id="OpenAllWIEntries" class="menu_button fa-solid fa-expand"></div>
|
||||||
|
<div id="CloseAllWIEntries" class="menu_button fa-solid fa-compress"></div>
|
||||||
<div class="world_popup_expander"> </div>
|
<div class="world_popup_expander"> </div>
|
||||||
<form id="form_rename_world" action="javascript:void(null);" method="post" enctype="multipart/form-data">
|
<form id="form_rename_world" action="javascript:void(null);" method="post" enctype="multipart/form-data">
|
||||||
<input id="world_popup_name" name="world_popup_name" class="text_pole" maxlength="99" size="32" value="" autocomplete="off">
|
<input id="world_popup_name" name="world_popup_name" class="text_pole" maxlength="99" size="32" value="" autocomplete="off">
|
||||||
|
@ -2166,7 +2166,7 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||||||
|
|
||||||
if (type !== 'quiet') {
|
if (type !== 'quiet') {
|
||||||
playMessageSound();
|
playMessageSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_loop_counter = 0;
|
generate_loop_counter = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -5589,7 +5589,10 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#OpenAllWIEntries', function () {
|
$(document).on('click', '#OpenAllWIEntries', function () {
|
||||||
$("#world_popup_entries_list").children().find('.inline-drawer-header').click()
|
$("#world_popup_entries_list").children().find('.down').click()
|
||||||
|
});
|
||||||
|
$(document).on('click', '#CloseAllWIEntries', function () {
|
||||||
|
$("#world_popup_entries_list").children().find('.up').click()
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).keyup(function (e) {
|
$(document).keyup(function (e) {
|
||||||
@ -5629,13 +5632,13 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('input', 'div[contenteditable="true"]', function() {
|
$(document).on('input', 'div[contenteditable="true"]', function () {
|
||||||
const caretPosition = saveCaretPosition($(this).get(0));
|
const caretPosition = saveCaretPosition($(this).get(0));
|
||||||
const myText = $(this).text().trim();
|
const myText = $(this).text().trim();
|
||||||
$(this).text(myText); // trim line breaks and spaces
|
$(this).text(myText); // trim line breaks and spaces
|
||||||
const masterSelector = $(this).data('for');
|
const masterSelector = $(this).data('for');
|
||||||
const masterElement = document.getElementById(masterSelector);
|
const masterElement = document.getElementById(masterSelector);
|
||||||
|
|
||||||
if (masterElement == null) {
|
if (masterElement == null) {
|
||||||
console.error('Master input element not found for the editable label', masterSelector);
|
console.error('Master input element not found for the editable label', masterSelector);
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user