PageSourceSearch

https://2mb.ru/wp-content/themes/mathematics/js/tiroll.js

js 2mb.ru collected 2026-10-02 19:49:34 UTC 1,767 bytes, 52 lines download raw bytes

1(function ($) {
2    $(function () {
3        var $sideroll       = $('#tiroll_up'), // àéäè áëîêà êîòîðûé áóäåò ïîÿâëÿòüñÿ
4            $watch_block    = $('#tiroll_on'),  // àéäè áëîêà ïîëîæåíèå êîòîðîãî îòñëåæèâàåòñÿ - äëÿ îòêðûòèÿ îêíà
5			$stop_watch_block    = $('#tiroll_off'),  // àéäè áëîêà ïîëîæåíèå êîòîðîãî îòñëåæèâàåòñÿ - äëÿ çàêðûòèÿ îêíà
6
7            enabled         = true,
8            hide_offset     = 0,
9            outer_margin    = 10,
10            shown           = false,
11
12            show = function() {
13                if(shown) return;
14                shown = true;
15
16                $sideroll.stop().animate({right: -hide_offset}, 300);
17            },
18
19            hide = function() {
20                if(!shown) return;
21                shown = false;
22
23                $sideroll.stop().animate({right: -$sideroll.outerWidth()-outer_margin}, 300);
24            },
25
26            disable = function(e) {
27                e.preventDefault();
28                enabled = false;
29                hide();
30            },
31
32            onscroll = function() {
33                if(!enabled) return;
34
35                var viewport_bottom = $(window).scrollTop() + $(window).height(),
36                    block_bottom    = $watch_block.offset().top + $watch_block.outerHeight();
37					stop_block_bottom    = $stop_watch_block.offset().top + $stop_watch_block.outerHeight();
38
39                if( viewport_bottom > (block_bottom + 1000) )
40					if( (stop_block_bottom - 100) > viewport_bottom )
41						show()
42					else
43						hide();
44                else
45                    hide();
46            };
47
48        $('.roll-close', $sideroll).click(disable);
49
50        $(window).scroll(onscroll).resize(onscroll);
51    })
52})(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.