From: unlishema Date: Thu, 18 Sep 2025 16:41:02 +0000 (-0400) Subject: Fixed a couple bugs in the CORS test X-Git-Url: https://git.slayer.unlishema.org/?a=commitdiff_plain;h=18fbb3f9080f5b0e6ce0c3a4eff1c4064b64be8a;p=slayer.unlishema.org%2F.git Fixed a couple bugs in the CORS test --- diff --git a/dist/dev.html b/dist/dev.html index 821f53e..7078c07 100644 --- a/dist/dev.html +++ b/dist/dev.html @@ -218,7 +218,7 @@ for (const key of keys) option.value += `'${key}',`; option.value = option.value.slice(0, -1); // Remove trailing comma - option.value += `).where('${keys[0]}', '${item[keys[0]]}').run()`; + option.value += `).where('${keys[0]}', '${item[keys[0]].replaceAll("'", "\\'")}').run()`; option.textContent = keys ? item[keys[0]] : "No KEYS"; document.getElementById("itemSelect").appendChild(option); @@ -226,7 +226,8 @@ if (i > 0) continue; // Only display the first item by default for (const key of keys) - extractedDataElement.innerHTML += `

${key}: ${item[key] || 'N/A'}

`; + extractedDataElement.innerHTML += `

${key}: ${!(key in item) ? 'false' : (item[key] === '' ? 'true' : item[key])}

`; + } rawDataElement.innerHTML = `
${JSON.stringify(itemData, null, 2)}
`; diff --git a/dist/pages/data/version.json b/dist/pages/data/version.json index ef08071..1529d43 100644 --- a/dist/pages/data/version.json +++ b/dist/pages/data/version.json @@ -1,3 +1,3 @@ { - "version": "0.0.32" + "version": "0.0.33" } \ No newline at end of file diff --git a/src/dev.html b/src/dev.html index 821f53e..7078c07 100644 --- a/src/dev.html +++ b/src/dev.html @@ -218,7 +218,7 @@ for (const key of keys) option.value += `'${key}',`; option.value = option.value.slice(0, -1); // Remove trailing comma - option.value += `).where('${keys[0]}', '${item[keys[0]]}').run()`; + option.value += `).where('${keys[0]}', '${item[keys[0]].replaceAll("'", "\\'")}').run()`; option.textContent = keys ? item[keys[0]] : "No KEYS"; document.getElementById("itemSelect").appendChild(option); @@ -226,7 +226,8 @@ if (i > 0) continue; // Only display the first item by default for (const key of keys) - extractedDataElement.innerHTML += `

${key}: ${item[key] || 'N/A'}

`; + extractedDataElement.innerHTML += `

${key}: ${!(key in item) ? 'false' : (item[key] === '' ? 'true' : item[key])}

`; + } rawDataElement.innerHTML = `
${JSON.stringify(itemData, null, 2)}
`; diff --git a/src/pages/data/version.json b/src/pages/data/version.json index ef08071..1529d43 100644 --- a/src/pages/data/version.json +++ b/src/pages/data/version.json @@ -1,3 +1,3 @@ { - "version": "0.0.32" + "version": "0.0.33" } \ No newline at end of file