32 lines
848 B
HTML
32 lines
848 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Clear Settings</title>
|
|
</head>
|
|
<body>
|
|
<h1>Clearing old settings...</h1>
|
|
<script>
|
|
// Clear ALL old settings
|
|
localStorage.clear();
|
|
|
|
// Set correct settings based on ACTUAL current hostname
|
|
const actualHostname = window.location.hostname;
|
|
|
|
const correctSettings = {
|
|
protocol: "http",
|
|
hostname: actualHostname, // Use actual hostname (localhost, IP, or DNS)
|
|
port: "8080",
|
|
useLocalStorage: false,
|
|
};
|
|
localStorage.setItem("api_settings", JSON.stringify(correctSettings));
|
|
|
|
alert(
|
|
"✅ Settings cleared!\n\nHostname: " +
|
|
actualHostname +
|
|
"\nPort: 8080\n\nRedirecting to port 5100..."
|
|
);
|
|
window.location.href = "http://" + actualHostname + ":5100";
|
|
</script>
|
|
</body>
|
|
</html>
|