PageSourceSearch

https://www.tbn.org/themes/custom/tbnnet/js/pagerViewsScroll.js?tm5b31

js tbn.org collected 2026-10-01 10:42:31 UTC 1,190 bytes, 26 lines download raw bytes

1(function ($) {
2  $(document).ready(
3    function(){
4      Drupal.AjaxCommands.prototype.viewsScrollTop = function (ajax, response, status) {
5        // Scroll to the top of the view. This will allow users
6        // to browse newly loaded content after e.g. clicking a pager
7        // link.
8        var offset = $(response.selector).offset();
9        // We can't guarantee that the scrollable object should be
10        // the body, as the view could be embedded in something
11        // more complex such as a modal popup. Recurse up the DOM
12        // and scroll the first element that has a non-zero top.
13        var scrollTarget = response.selector;
14        while ($(scrollTarget).scrollTop() == 0 && $(scrollTarget).parent()) {
15          scrollTarget = $(scrollTarget).parent();
16        }
17        var navbar = $("#navbar");
18        var header_height = navbar.outerHeight() ? (navbar.outerHeight(true) + navbar.offset().top - $(window).scrollTop() + 100) : 20;
19        // Only scroll upward
20        if (offset.top - header_height < $(scrollTarget).scrollTop()) {
21          $(scrollTarget).animate({scrollTop: (offset.top - header_height)}, 500);
22        }
23      };
24    }
25  );
26})(jQuery);

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.