templates/include/preloader_script.html.twig line 1

Open in your IDE?
  1. <script>
        var preloader = document.querySelector('.wm-spinner');
        var html = document.querySelector('html');
    
        var mainContent = document.querySelector('.main-content');
        var header = document.querySelector('header');
    
        if (!header.classList.contains('filled')) {
            preloader.classList.add('over')
        } else {
            mainContent.classList.add('under');
        }
    
        var preloaderHandlerInitial = function() {
            preloader.classList.remove('active');
            html.classList.remove('no-scroll');
        };
    
        window.addEventListener('preloader', function() {
            preloaderHandlerInitial();
        })
    
        require(['assets/front/js/main'], function() {
            window.dispatchEvent(new Event('preloader'));
        });
    </script>