PageSourceSearch

https://ledy.su/wp-content/themes/News/js/widgets/slideshow.js?ver=a23bf23715e5b67d24eff5d46bd243d8

js ledy.su collected 2026-09-30 10:40:54 UTC 2,344 bytes, 61 lines download raw bytes

1//
2// GK News Slideshow
3//
4(function () {
5    "use strict";
6    jQuery(window).load(function () {
7        jQuery('.gk-news-slideshow').each(function (i, widget) {
8            widget = jQuery(widget);
9            var current_offset = 0;
10            var arts = widget.find('.gk-ns-art');
11            var anim_speed = 500;
12            var animation = false;
13            var scrollWrap = widget.find('.gk-ns-arts-scroll');
14            widget.find('.gk-ns-arts-scroll').first().css('width', (jQuery(arts[0]).outerWidth() * arts.length) + 2);
15
16            var margin = parseInt(widget.find('.gk-ns-art').first().css('margin-right'), 0);
17            var offset = widget.find('.gk-ns-art').first().outerWidth() + margin;
18            var size = widget.find('.gk-ns-arts').first().outerWidth();
19            var scrollSize = (jQuery(arts[0]).outerWidth() + margin) * arts.length;
20            var amountInView = Math.floor(size / offset);
21            var totalAmount = widget.find('.gk-ns-art').length;
22
23            // reset
24            scrollWrap.css('margin-left', 0);
25
26            if (totalAmount > amountInView) {
27                if (widget.find('.gk-ns-prev')) {
28                    widget.find('.gk-ns-prev').click(function () {
29                        animation = true;
30
31                        if (current_offset <= 0) {
32                            current_offset = scrollSize - size - (2 * totalAmount);
33                        } else {
34                            current_offset -= offset;
35                        }
36
37                        scrollWrap.animate({
38                            'margin-left': -1 * current_offset
39                        }, anim_speed);
40                    });
41                }
42
43                if (widget.find('.gk-ns-next')) {
44                    widget.find('.gk-ns-next').click(function () {
45                        animation = true;
46
47                        if (current_offset <= scrollSize - size - (2 * totalAmount)) {
48                            current_offset += offset;
49                        } else {
50                            current_offset = 0;
51                        }
52
53                        scrollWrap.animate({
54                            'margin-left': -1 * current_offset
55                        }, anim_speed);
56                    });
57                }
58            }
59        });
60    });
61})();

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.