Skip to content

Apply hotfix changes - v0.117.11 #1344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
@@ -13,23 +13,5 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module">
// Set favicon dynamically based on configuration
import config from '../src/config.js';

// Create a new link element for the favicon
const faviconLink = document.createElement('link');
faviconLink.rel = 'icon';
faviconLink.type = 'image/svg+xml';
faviconLink.href = config.favicon;

// Replace any existing favicon or add if none exists
const existingFavicon = document.querySelector('link[rel="icon"]');
if (existingFavicon) {
document.head.removeChild(existingFavicon);
}
document.head.appendChild(faviconLink);

</script>
</body>
</html>
15 changes: 15 additions & 0 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import { GenericLoader } from "./components/generic-loader/GenericLoader";
import { LazyLoader } from "./components/widgets/lazy-loader/LazyLoader.jsx";
import { SocketProvider } from "./helpers/SocketContext.js";
import "./index.css";
import config from "./config.js";

const enablePosthog = process.env.REACT_APP_ENABLE_POSTHOG;
if (enablePosthog !== "false") {
@@ -22,6 +23,20 @@ if (enablePosthog !== "false") {
});
}

// Utility to set favicon
function setFavicon(url) {
let link = document.querySelector("link[rel~='icon']");
if (!link) {
link = document.createElement("link");
link.rel = "icon";
document.head.appendChild(link);
}
link.href = url;
}

// Call this after config is loaded
setFavicon(config.favicon);

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>