work: remove all other uses of config.js

This commit is contained in:
kittentm 2026-03-14 03:06:30 +01:00
commit 28e5bb6aa7
No known key found for this signature in database
GPG key ID: AC43DFDBC1F44A91
6 changed files with 4 additions and 19 deletions

View file

@ -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'
});

View file

@ -103,6 +103,5 @@
<div class="corner-patch"></div>
</div>
<script src="config.js"></script>
</body>
</html>

View file

@ -1,3 +1,2 @@
<script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
<script src="config.js"></script>
<script src="autoredirect.js"></script>

View file

@ -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");
});

View file

@ -12,7 +12,6 @@
<meta content="no-cache" http-equiv="pragma"/>
<title>Sign In to Splatfestival Network</title>
<link href="../splatfestival/css/style-auth.css" rel="stylesheet"/>
<script src="/config.js"></script>
<script src="../splatfestival/js/base_e42dadd1.js"></script>
<script src="splatfestivalyay.js"></script>
<script src="../splatfestival/353f197638abe79a7d2dc7a7fd522d075d11521d/satelliteLib-df3d4f52ec08e860f63e4ce57be273a0ed391ab8.js"></script>

View file

@ -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'
});