Update 1.js

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