From 28e5bb6aa731641d0dbd97b8f6abde01d882b601 Mon Sep 17 00:00:00 2001 From: KittenTM Date: Sat, 14 Mar 2026 03:06:30 +0100 Subject: [PATCH] work: remove all other uses of config.js --- autoredirect.js | 3 +-- header.html | 1 - index.html | 1 - logout.js | 12 +----------- users/auth/splatfestival/index.html | 1 - users/auth/splatfestival/splatfestivalyay.js | 5 ++--- 6 files changed, 4 insertions(+), 19 deletions(-) diff --git a/autoredirect.js b/autoredirect.js index 252feb5..a749093 100644 --- a/autoredirect.js +++ b/autoredirect.js @@ -1,10 +1,9 @@ document.addEventListener("DOMContentLoaded", function () { - const apiBase = CONFIG.API_BASE_URL; const friendListUrl = "/friend_list/index.html"; async function checkExistingSession() { try { - const response = await fetch(`${apiBase}/api/v1/session_id/check`, { + const response = await fetch("/api/v1/session_id/check", { method: 'GET', credentials: 'include' }); diff --git a/header.html b/header.html index 7dc952e..ec1d729 100644 --- a/header.html +++ b/header.html @@ -103,6 +103,5 @@
- \ No newline at end of file diff --git a/index.html b/index.html index dcb5fad..28bc3aa 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,2 @@ - \ No newline at end of file diff --git a/logout.js b/logout.js index ae68379..d008d7e 100644 --- a/logout.js +++ b/logout.js @@ -1,20 +1,10 @@ $(document).ready(function () { const form = $("#logout-form"); - if (typeof CONFIG === 'undefined') { - alert("CRITICAL ERROR: config.js not loaded before logout.js"); - return; - } - const apiBase = CONFIG.API_BASE_URL; - const targetAction = apiBase.replace(/\/$/, "") + "/spfn/logout"; $("#logout_frontend_origin").val(window.location.origin); - form.attr("action", targetAction); + form.attr("action", "/api/v1/spfn/logout"); - console.log("Form action set to: " + targetAction); - form.submit(function(e) { - alert("Submitting to: " + $(this).attr("action")); - const submitBtn = $(":submit", this); submitBtn.prop("disabled", true).css("opacity", "0.5"); }); diff --git a/users/auth/splatfestival/index.html b/users/auth/splatfestival/index.html index beca97f..57c6da7 100644 --- a/users/auth/splatfestival/index.html +++ b/users/auth/splatfestival/index.html @@ -12,7 +12,6 @@ Sign In to Splatfestival Network - diff --git a/users/auth/splatfestival/splatfestivalyay.js b/users/auth/splatfestival/splatfestivalyay.js index 1e81769..3488861 100644 --- a/users/auth/splatfestival/splatfestivalyay.js +++ b/users/auth/splatfestival/splatfestivalyay.js @@ -2,15 +2,14 @@ $(document).ready(function () { const form = $("#auth-form"); const errorContainer = $("#auth-error"); const urlParams = new URLSearchParams(window.location.search); - const apiBase = CONFIG.API_BASE_URL; $("#frontend_origin").val(window.location.origin); - form.attr("action", apiBase + "/api/v2/sso/spfn/generate_token"); + form.attr("action", "/api/v2/sso/spfn/generate_token"); async function checkExistingSession() { try { - const response = await fetch(apiBase + "/api/v1/session_id/check", { + const response = await fetch("/api/v1/session_id/check", { method: 'GET', credentials: 'include' });