// Скрипт перезагрузки страници свайпом. let app_scroll = false; let animID = document.getElementById('swipe_updater'); let animIconID = document.getElementById('swipe_icon'); window.addEventListener('scroll', function(e) { if (window.matchMedia('(display-mode: standalone)').matches) { let a = window.scrollY; let b = 50; let c = 125; a = -a; a = a; animIconID.style.top = a/1.5; console.log(window.scrollY); if(window.scrollY <= -10){ animID.style.zIndex = 115; } else { animID.style.zIndex = 0; } if(window.scrollY <= -120){ if(app_scroll == false){ app_scroll = true; animIconID.style.transform = 'rotate(180deg)'; animIconID.setAttribute('data-state', '') } } else if(window.scrollY >= 0){ if(app_scroll == true){ appReload(); app_scroll = false; animIconID.style.transform = 'rotate(0deg)'; animIconID.setAttribute('data-state', 'active') } } } });