added rpc

This commit is contained in:
2025-12-04 03:13:13 +01:00
parent 6973f1485d
commit d0cc461c1c
16 changed files with 268 additions and 8 deletions

View File

@@ -66,6 +66,16 @@ async function loadMetadata() {
document.getElementById('anime-title-details2').innerText = title;
document.title = `Watching ${title} - Ep ${currentEpisode}`;
fetch("/api/rpc", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({
details: title,
state: `Episode ${currentEpisode}`,
mode: "watching"
})
});
const tempDiv = document.createElement('div');
tempDiv.innerHTML = description;
document.getElementById('detail-description').innerText = tempDiv.textContent || tempDiv.innerText || 'No description available.';