a lil oopsie

This commit is contained in:
2026-03-29 21:19:53 -05:00
parent cf155183f2
commit 0224d88313
9 changed files with 11 additions and 15 deletions

View File

@@ -2306,7 +2306,7 @@
async function checkServerStatus(ip, isDeployed = false) {
statusIndicator.textContent = "Connecting...";
statusIndicator.className = "status-indicator connecting";
const url = isDeployed ? "/identify" : `http://{ip}:7275/identify`;
const url = isDeployed ? "/identify" : `https://{ip}:7275/identify`;
try {
const response = await fetch(url, {

View File

@@ -527,7 +527,7 @@
// --- State ---
const getServerUrl = () => {
const extensionServerIp = localStorage.getItem("extension_server_ip") || "localhost";
const url = "http://" + extensionServerIp + ":7275";
const url = "";
console.log("[manga-info] serverUrl=", url);
return url;
};

View File

@@ -661,7 +661,7 @@
document.addEventListener("DOMContentLoaded", () => {
const getServerUrl = () => {
const extensionServerIp = localStorage.getItem("extension_server_ip") || "localhost";
const url = "http://" + extensionServerIp + ":7275";
const url = "";
console.log("[manga] serverUrl=", url);
return url;
};

View File

@@ -560,7 +560,7 @@
let currentGenre = { id: null, name: null };
let allSearchResults = [];
let searchTimeout;
const serverUrl = `http://${localStorage.getItem("extension_server_ip") || "localhost"}:7275`;
const serverUrl = ``;
// --- View Management ---
function updateToggleIndicator() {

View File

@@ -1139,7 +1139,7 @@
<script>
let currentMalId = new URLSearchParams(window.location.search).get("id");
const extensionIp = localStorage.getItem("extension_server_ip") || "localhost";
let serverUrl = `http://${extensionIp}:7275`;
let serverUrl = ``;
// Assumes the Python backend is available at port 7275 on the extension server or localhost.
const THEMES_API = serverUrl + "/api/themes";

View File

@@ -904,11 +904,7 @@
const extensionServerItem = document.getElementById("extensionServerItem");
function getApiUrl(path) {
const isDeployed = window.location.protocol.startsWith("http");
if (isDeployed) return path;
const ip = localStorage.getItem("extension_server_ip");
if (!ip) { console.error("Extension IP not found."); return null; }
return `http://${ip}:7275${path}`;
return "";
}
async function initialize() {

View File

@@ -379,7 +379,7 @@
const [jikanInfoResp, jikanEpisodesResp, kitsuMapResp] = await Promise.all([
fetch(`https://api.jikan.moe/v4/anime/${jikanId}`),
fetch(`https://api.jikan.moe/v4/anime/${jikanId}/episodes`),
fetch(`http://${serverIp}:7275/map/mal/${jikanId}`)
fetch(`/map/mal/${jikanId}`)
]);
if (jikanInfoResp.ok) {
@@ -430,7 +430,7 @@
async function populateSourceChanger() {
try {
const response = await fetch(`http://${serverIp}:7275/modules/streaming`);
const response = await fetch(`/modules/streaming`);
if (!response.ok) throw new Error('Failed to fetch streaming modules');
const modules = await response.json();
@@ -499,7 +499,7 @@
loadingContainer.style.display = 'flex';
}
let iframeSrcURL = `http://${serverIp}:7275/iframe-src?mal_id=${jikanId}&episode=${episode}&dub=${dub}`;
let iframeSrcURL = `/iframe-src?mal_id=${jikanId}&episode=${episode}&dub=${dub}`;
if (preferModule && preferModule !== 'default') {
iframeSrcURL += `&prefer_module=${encodeURIComponent(preferModule)}`;
}