PageSourceSearch

https://www.nzixnph.xyz/usr/themes/Mirages/js/7.10.0/index.js?v=2

js nzixnph.xyz collected 2026-09-26 05:36:08 UTC 2,119 bytes, 58 lines download raw bytes

1$(function () {
2    const getScrollContainer = () => $('html, body');
3
4    function scrollToElement(selector, call) {
5        let navbarHeight = 0;
6        if ($(window).width() > 767) {
7            navbarHeight = $('#navbar').outerHeight() || 0;
8        }
9
10        const $el = $(selector).first();
11        if (!$el.length) return;
12
13        // 先滚到顶部,等 50ms 让 DOM 重新回流,再滚目标位置
14        $('html, body').stop(true).scrollTop(0);
15
16        setTimeout(() => {
17            const top = $el.offset().top;
18            $('html, body').stop(true).animate({
19                scrollTop: top - navbarHeight
20            }, 300, function () {
21                call()
22            });
23        }, 50);
24    }
25
26    // 置顶
27    $('.icon-top-unselect').click(() => {
28        getScrollContainer().stop(true).animate({ scrollTop: 0 }, 300, function () {
29            $('.icon-top-select').removeClass('icon-top-select').addClass('icon-top-unselect');
30        });
31        $('.icon-top-unselect').removeClass('icon-top-unselect').addClass('icon-top-select');
32    });
33
34    // 正文
35    $('.icon-content-unselect').click(() => {
36        scrollToElement('.post-content > p', () => {
37            $('.icon-content-select').removeClass('icon-content-select').addClass('icon-content-unselect');
38        });
39        $('.icon-content-unselect').removeClass('icon-content-unselect').addClass('icon-content-select');
40    });
41
42    // 视频
43    $('.icon-video-unselect').click(() => {
44        scrollToElement('.post-content > .vodplayer-container', () => {
45            $('.icon-video-select').removeClass('icon-video-select').addClass('icon-video-unselect');
46        });
47        $('.icon-video-unselect').removeClass('icon-video-unselect').addClass('icon-video-select');
48    });
49
50    // 评论
51    $('.icon-comment-unselect').click(() => {
52        scrollToElement('#comments', () => {
53            $('.icon-comment-select').removeClass('icon-comment-select').addClass('icon-comment-unselect');
54        });
55        $('.icon-comment-unselect').removeClass('icon-comment-unselect').addClass('icon-comment-select');
56    });
57
58});

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.