mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Refactor chid/grid attributes to data attributes
- We don't believe in imaginary HTML attributes that we make up, right?
This commit is contained in:
@@ -4731,7 +4731,7 @@ export function checkEmbeddedWorld(chid) {
|
||||
}
|
||||
|
||||
if (characters[chid]?.data?.character_book) {
|
||||
$('#import_character_info').data('chid', chid).show();
|
||||
$('#import_character_info').data('data-chid', chid).show();
|
||||
|
||||
// Only show the alert once per character
|
||||
const checkKey = `AlertWI_${characters[chid].avatar}`;
|
||||
@@ -4765,7 +4765,7 @@ export function checkEmbeddedWorld(chid) {
|
||||
}
|
||||
|
||||
export async function importEmbeddedWorldInfo(skipPopup = false) {
|
||||
const chid = $('#import_character_info').data('chid');
|
||||
const chid = $('#import_character_info').data('data-chid');
|
||||
|
||||
if (chid === undefined) {
|
||||
return;
|
||||
@@ -5149,7 +5149,7 @@ jQuery(() => {
|
||||
});
|
||||
|
||||
$('#world_button').on('click', async function (event) {
|
||||
const chid = $('#set_character_world').data('chid');
|
||||
const chid = $('#set_character_world').data('data-chid');
|
||||
|
||||
if (chid) {
|
||||
const worldName = characters[chid]?.data?.extensions?.world;
|
||||
|
Reference in New Issue
Block a user