Update 1.js

This commit is contained in:
FURK4NGG
2025-03-30 10:10:41 +03:00
committed by GitHub
parent 26f19c3bd6
commit 029c08a4a7
+7 -3
View File
@@ -251,10 +251,14 @@ window.addEventListener("scroll", () => {
/*when the window is reloading or loading*/ /*when the window is reloading or loading*/
window.addEventListener('load', function() { window.addEventListener('load', function() {
const targetElement = document.getElementById('container_1'); setTimeout(() => {
targetElement.scrollIntoView(); window.scrollTo({ top: 0, behavior: 'smooth' });
}, 50);
const sidebarCheckbox = document.getElementById('sidebar-active'); const sidebarCheckbox = document.getElementById('sidebar-active');
if (sidebarCheckbox.checked) {sidebarCheckbox.checked = false;} if (sidebarCheckbox && sidebarCheckbox.checked) {
sidebarCheckbox.checked = false;
}
}); });