PageSourceSearch

https://board.thaivi.org/styles/thaivi_desktop_v3/template/thaivi3_header.js?assets_version=816

js thaivi.org collected 2026-10-02 11:10:26 UTC 969 bytes, 26 lines download raw bytes

1jQuery(function ($) {
2    var lastScrollTop = 0;
3    var headerbar = document.querySelector('.headerbar');
4    var headerbar_search = document.querySelector('#search-box');
5    var navbar = document.querySelector('#page-header .navbar');
6
7    $(window).on('scroll', function () {
8        var currentScroll = $(this).scrollTop();
9
10        if (currentScroll > lastScrollTop) {
11            // เลื่อนลง
12            headerbar.classList.add('minimized');
13            headerbar_search.classList.remove('hide');
14            $('.hide-on-scroll').fadeOut(500);
15            navbar.classList.add('hide-navbar');
16        } else {
17            // เลื่อนขึ้น
18            headerbar.classList.remove('minimized');
19            headerbar_search.classList.add('hide');
20            $('.hide-on-scroll').fadeIn(500);
21            navbar.classList.remove('hide-navbar');
22        }
23
24        lastScrollTop = currentScroll <= 0 ? 0 : currentScroll;
25    });
26});

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.