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