PageSourceSearch

https://www.clinvest.ru/assets/js/article_contents.js

js clinvest.ru collected 2026-10-02 07:25:56 UTC 2,559 bytes, 77 lines download raw bytes

1
2$(document).ready(function(){
3    var html = '<li><a href="#articleAbstract">';
4    html += $("#articleAbstract h3").text();
5    html+= '</a></li>';
6
7    html +='<li><a href="#articleSubject">';
8    html += $("#articleSubject h3").text();
9    html+= '</a></li>';
10
11    var iter = 1;
12    $(".fullHTML h2, .fullHTML h3, .fullHTML h4").each(function(){
13        var fhead = "fhead"+iter;
14        $(this).attr("id", fhead);
15        if($(this).prop("tagName")=='H2'){
16            html += '<li><a href="#'+fhead+'">'+$(this).text()+'</a></li>';
17        }
18        else if($(this).prop("tagName")=='H3'){
19            html += '<li><ul><li><a href="#'+fhead+'">'+$(this).text()+'</a></li></ul></li>';
20        }
21        else if($(this).prop("tagName")=='H4'){
22            html += '<li><ul><li><ul><li><a href="#'+fhead+'">'+$(this).text()+'</a></li></ul></li></ul></li>';
23        }
24        iter += 1;
25    });
26
27    html +='<li><a href="#articleCitations">';
28    html += $("#articleCitations h2").text();
29    html+= '</a></li>';
30
31    $("#article-contents-data-list").html(html);
32
33    var nav_offset=$('nav.navbar').height()+51;
34    var fixmeTop = $('#article-contents').offset().top;
35    $(document.body).on('touchmove', onScroll);
36	$(window).on('scroll', onScroll);
37    function onScroll() {
38        var currentScroll = jQuery(window).scrollTop();
39        if (currentScroll >= fixmeTop-nav_offset) {
40            $('#article-contents').css({
41                position: 'fixed',
42                top: nav_offset+'px',
43            });
44        } else {
45            $('#article-contents').css({
46                position: 'relative',
47                top: 0,
48            });
49        }
50    }
51
52    $("#article-contents-data-list a").click(function(){
53        var offset = -150; 
54        var currentScroll = jQuery(window).scrollTop();
55        if (currentScroll < fixmeTop-nav_offset) {
56            offset -= nav_offset-19;
57        }
58        if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
59            $(".article-contents-data").toggleClass('ib');
60            var target = $(this.hash);
61            target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
62            if (target.length) {
63                $('html, body').animate({
64                    scrollTop: target.offset().top + offset
65                }, 500);
66                return false;
67            }
68            
69        }
70    });
71
72
73});
74
75$(".article-contents-head").click(function(){
76    $(".article-contents-data").toggleClass("ib");
77});

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.