Update 1.js

This commit is contained in:
FURK4NGG
2025-03-30 10:01:03 +03:00
committed by GitHub
parent 68a5108c1f
commit f7adbc09d3
+9 -2
View File
@@ -246,10 +246,17 @@ 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() {
requestAnimationFrame(() => {
const targetElement = document.getElementById('container_1'); const targetElement = document.getElementById('container_1');
targetElement.scrollIntoView(); if (targetElement) {
targetElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
});
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;
}
}); });