mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 09:26:33 +01:00
[skip ci] ESLint
This commit is contained in:
parent
a73cb9ad3d
commit
fb1b327f9a
@ -1477,14 +1477,14 @@ export function initTags() {
|
|||||||
toggleAutoSortTags(evt.originalEvent, toggle);
|
toggleAutoSortTags(evt.originalEvent, toggle);
|
||||||
printViewTagList();
|
printViewTagList();
|
||||||
});
|
});
|
||||||
$(document).on('focusout', `#dialogue_popup .tag_view_name`, (evt) => {
|
$(document).on('focusout', '#dialogue_popup .tag_view_name', (evt) => {
|
||||||
// Remember the order, so we can flash highlight if it changed after reprinting
|
// Remember the order, so we can flash highlight if it changed after reprinting
|
||||||
const tagId = $(evt.target).parent('.tag_view_item').attr('id');
|
const tagId = $(evt.target).parent('.tag_view_item').attr('id');
|
||||||
const oldOrder = $(`#dialogue_popup .tag_view_item`).map((_, el) => el.id).get();
|
const oldOrder = $('#dialogue_popup .tag_view_item').map((_, el) => el.id).get();
|
||||||
|
|
||||||
printViewTagList();
|
printViewTagList();
|
||||||
|
|
||||||
const newOrder = $(`#dialogue_popup .tag_view_item`).map((_, el) => el.id).get();
|
const newOrder = $('#dialogue_popup .tag_view_item').map((_, el) => el.id).get();
|
||||||
const orderChanged = !oldOrder.every((id, index) => id === newOrder[index]);
|
const orderChanged = !oldOrder.every((id, index) => id === newOrder[index]);
|
||||||
if (orderChanged) {
|
if (orderChanged) {
|
||||||
flashHighlight($(`#dialogue_popup .tag_view_item[id="${tagId}"]`));
|
flashHighlight($(`#dialogue_popup .tag_view_item[id="${tagId}"]`));
|
||||||
|
@ -31,7 +31,7 @@ export const debounce_timeout = {
|
|||||||
relaxed: 1000,
|
relaxed: 1000,
|
||||||
/** [5 sec] For delayed tasks, like auto-saving or completing batch operations that need a significant pause. */
|
/** [5 sec] For delayed tasks, like auto-saving or completing batch operations that need a significant pause. */
|
||||||
extended: 5000,
|
extended: 5000,
|
||||||
}
|
};
|
||||||
|
|
||||||
export function escapeHtml(str) {
|
export function escapeHtml(str) {
|
||||||
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
||||||
|
Loading…
Reference in New Issue
Block a user