Initial commit - Church Music Database
This commit is contained in:
31
legacy-site/frontend/public/clear-settings.html
Normal file
31
legacy-site/frontend/public/clear-settings.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user