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:
Wolfsblvt
2025-01-24 21:12:49 +01:00
parent a611a3ac59
commit 7c9b347116
7 changed files with 34 additions and 26 deletions

View File

@@ -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;