PageSourceSearch

https://eyepatient.net/Content/assets/js/main.js

js eyepatient.net collected 2026-10-02 00:22:35 UTC 4,532 bytes, 153 lines download raw bytes

1/**
2 * Template Name: ZenBlog - v1.3.0
3 * Template URL: https://bootstrapmade.com/zenblog-bootstrap-blog-template/
4 * Author: BootstrapMade.com
5 * License: https:///bootstrapmade.com/license/
6 */
7document.addEventListener('DOMContentLoaded', () => {
8    "use strict";
9
10    /**
11     * Sticky header on scroll
12     */
13    const selectHeader = document.querySelector('#header');
14    if (selectHeader) {
15        document.addEventListener('scroll', () => {
16            window.scrollY > 100 ? selectHeader.classList.add('sticked') : selectHeader.classList.remove('sticked');
17        });
18    }
19
20    /**
21     * Mobile nav toggle
22     */
23
24    const mobileNavToogleButton = document.querySelector('.mobile-nav-toggle');
25
26    if (mobileNavToogleButton) {
27        mobileNavToogleButton.addEventListener('click', function(event) {
28            event.preventDefault();
29            mobileNavToogle();
30        });
31    }
32
33    function mobileNavToogle() {
34        document.querySelector('body').classList.toggle('mobile-nav-active');
35        mobileNavToogleButton.classList.toggle('bi-list');
36        mobileNavToogleButton.classList.toggle('bi-x');
37    }
38
39    /**
40     * Hide mobile nav on same-page/hash links
41     */
42    document.querySelectorAll('#navbar a').forEach(navbarlink => {
43
44        if (!navbarlink.hash) return;
45
46        let section = document.querySelector(navbarlink.hash);
47        if (!section) return;
48
49        navbarlink.addEventListener('click', () => {
50            if (document.querySelector('.mobile-nav-active')) {
51                mobileNavToogle();
52            }
53        });
54    });
55
56    /**
57     * Toggle mobile nav dropdowns
58     */
59    const navDropdowns = document.querySelectorAll('.navbar .dropdown > a');
60
61    navDropdowns.forEach(el => {
62        el.addEventListener('click', function(event) {
63            if (document.querySelector('.mobile-nav-active')) {
64                event.preventDefault();
65                this.classList.toggle('active');
66                this.nextElementSibling.classList.toggle('dropdown-active');
67
68                let dropDownIndicator = this.querySelector('.dropdown-indicator');
69                dropDownIndicator.classList.toggle('bi-chevron-up');
70                dropDownIndicator.classList.toggle('bi-chevron-down');
71            }
72        })
73    });
74
75    /**
76     * Scroll top button
77     */
78    const scrollTop = document.querySelector('.scroll-top');
79    if (scrollTop) {
80        const togglescrollTop = function() {
81            window.scrollY > 100 ? scrollTop.classList.add('active') : scrollTop.classList.remove('active');
82        }
83        window.addEventListener('load', togglescrollTop);
84        document.addEventListener('scroll', togglescrollTop);
85        scrollTop.addEventListener('click', window.scrollTo({
86            top: 0,
87            behavior: 'smooth'
88        }));
89    }
90
91    /**
92     * Hero Slider
93     */
94    var swiper = new Swiper(".sliderFeaturedPosts", {
95        spaceBetween: 0,
96        speed: 500,
97        centeredSlides: true,
98        loop: true,
99        slideToClickedSlide: true,
100        autoplay: {
101            delay: 3000,
102            disableOnInteraction: false,
103        },
104        pagination: {
105            el: ".swiper-pagination",
106            clickable: true,
107        },
108        navigation: {
109            nextEl: ".custom-swiper-button-next",
110            prevEl: ".custom-swiper-button-prev",
111        },
112    });
113
114    /**
115     * Open and close the search form.
116     */
117    // const searchOpen = document.querySelector('.js-search-open');
118    // const searchClose = document.querySelector('.js-search-close');
119    // const searchWrap = document.querySelector(".js-search-form-wrap");
120
121    // searchOpen.addEventListener("click", (e) => {
122    //     e.preventDefault();
123    //     searchWrap.classList.add("active");
124    // });
125
126    // searchClose.addEventListener("click", (e) => {
127    //     e.preventDefault();
128    //     searchWrap.classList.remove("active");
129    // });
130
131    /**
132     * Initiate glightbox
133     */
134    const glightbox = GLightbox({
135        selector: '.glightbox'
136    });
137
138    /**
139     * Animation on scroll function and init
140     */
141    function aos_init() {
142        AOS.init({
143            duration: 1000,
144            easing: 'ease-in-out',
145            once: true,
146            mirror: false
147        });
148    }
149    window.addEventListener('load', () => {
150        aos_init();
151    });
152
153});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.