Update README.md

Temporary Fix for Navigation
This commit is contained in:
M0RPH3US authored and GitHub committed 2025-02-12 20:41:04 +05:30
1 parent 8c55e30aad
commit eb6d076d4c
1 file changed
+37
+37
View File
@@ -43,6 +43,43 @@ Here I present my version of the same with some code improvements, loading optim
2. Search for `</body></html>`
3. Just before the `</body`, plug the below code
```
<script>
(function () {
// List of CSS selectors for Home buttons
const buttonSelectors = [
".headerHomeButton.barsMenuButton",
".css-17c09up",
".mainDrawer-scrollContainer > a:nth-child(2)"
];
// Polling interval to check for buttons
const intervalId = setInterval(function () {
buttonSelectors.forEach(selector => {
// Try to find the button
const homeButton = document.querySelector(selector);
// If the button is found
if (homeButton) {
// Attach the click event listener if not already added
if (!homeButton.hasAttribute("data-home-handler")) {
homeButton.addEventListener("click", function (event) {
event.preventDefault(); // Prevent default behavior if necessary
window.location.href = "/web/index.html#/home.html";
});
// Mark the button as handled
homeButton.setAttribute("data-home-handler", "true");
}
}
});
// Stop polling if all buttons are found
if (buttonSelectors.every(selector => document.querySelector(selector))) {
clearInterval(intervalId);
}
}, 100); // Check every 100ms
})();
</script>
<link rel="preload" href="/web/avatars/slideshowpure.css" as="style" />
<link rel="stylesheet" href="/web/avatars/slideshowpure.css" />
<script defer src="/web/avatars/slideshowpure.js"></script>