PageSourceSearch

https://dachaputina22.ru/templates/Putin/js/ui.js

js dachaputina22.ru collected 2026-10-09 22:35:29 UTC 4,844 bytes, 175 lines download raw bytes

1(function($) {
2    var selectors = [];
3
4    var check_binded = false;
5    var check_lock = false;
6    var defaults = {
7        interval: 250,
8        force_process: false
9    }
10    var $window = $(window);
11
12    var $prior_appeared;
13
14    function process() {
15        check_lock = false;
16        for (var index = 0; index < selectors.length; index++) {
17            var $appeared = $(selectors[index]).filter(function() {
18                return $(this).is(':appeared');
19            });
20
21            $appeared.trigger('appear', [$appeared]);
22
23            if ($prior_appeared) {
24                var $disappeared = $prior_appeared.not($appeared);
25                $disappeared.trigger('disappear', [$disappeared]);
26            }
27            $prior_appeared = $appeared;
28        }
29    }
30
31    $.expr[':']['appeared'] = function(element) {
32        var $element = $(element);
33        if (!$element.is(':visible')) {
34            return false;
35        }
36
37        var window_left = $window.scrollLeft();
38        var window_top = $window.scrollTop();
39        var offset = $element.offset();
40        var left = offset.left;
41        var top = offset.top;
42
43        if (top + $element.height() >= window_top &&
44            top - ($element.data('appear-top-offset') || 0) <= window_top + $window.height() &&
45            left + $element.width() >= window_left &&
46            left - ($element.data('appear-left-offset') || 0) <= window_left + $window.width()) {
47            return true;
48        } else {
49            return false;
50        }
51    }
52
53    $.fn.extend({
54        appear: function(options) {
55            var opts = $.extend({}, defaults, options || {});
56            var selector = this.selector || this;
57            if (!check_binded) {
58                var on_check = function() {
59                    if (check_lock) {
60                        return;
61                    }
62                    check_lock = true;
63
64                    setTimeout(process, opts.interval);
65                };
66
67                $(window).scroll(on_check).resize(on_check);
68                check_binded = true;
69            }
70
71            if (opts.force_process) {
72                setTimeout(process, opts.interval);
73            }
74            selectors.push(selector);
75            return $(selector);
76        }
77    });
78
79    $.extend({
80        force_appear: function() {
81            if (check_binded) {
82                process();
83                return true;
84            };
85            return false;
86        }
87    });
88})(jQuery);
89
90var isMobile = false;
91
92(function( $ ) {
93    "use strict";
94
95    $(function() {
96		if (navigator.userAgent.match(/Android/i) ||
97		    navigator.userAgent.match(/webOS/i) ||
98		    navigator.userAgent.match(/iPhone/i) ||
99		    navigator.userAgent.match(/iPad/i)||
100		    navigator.userAgent.match(/iPod/i) ||
101		    navigator.userAgent.match(/IEMobile/i) ||
102		    navigator.userAgent.match(/BlackBerry/i)) {
103		    isMobile = true;
104		}
105
106        if (isMobile == true) {
107            $('.animated').removeClass('animated');
108            $('.op0').removeClass('op0');
109        }
110
111        if (isMobile == false) {
112            $('*[data-animated]').addClass('animated');
113        }
114
115        function animated_contents() {
116            $(".animated:appeared").each(function (i) {
117                var $this    = $(this),
118                    animated = $(this).data('animated');
119
120                setTimeout(function () {
121                    $this.addClass(animated);
122                }, 100 * i);
123
124            });
125        }
126
127        if (isMobile == false) {
128            animated_contents();
129            $(window).scroll(function () {
130                animated_contents();
131            });
132        }
133    });
134
135}(jQuery));
136
137
138$(function() {
139	$(".show-login").click(function(){
140		$(".overlay").fadeIn("300");
141	});
142	
143    $('#loginbox').append('<i class="fa fa-times-circle overlay-close"></i>');  
144    $(".overlay-close").click(function(){
145		$(".overlay").fadeOut("300");
146	});
147	
148	$(".serch .fa").click(function(){
149		$("#search-form").fadeIn(300);
150	});
151	$(".search-close").click(function(){
152		$("#search-form").fadeOut(300);
153	});
154	if (isMobile == false) {
155        $("html").niceScroll();
156    };
157    if (isMobile == true) {
158        $(".work > a").removeClass("ulightbox");
159        $(".work a > span, .work a > i, .work a > h5").css("display", "none");
160    };
161    $("#go-top").click(function () {
162        $('body,html').animate({
163            scrollTop: 0
164        }, 500);
165        return false;
166    });
167    $(".p-cats-left > span").click(function(){
168        $(".p-cats-list").toggle(0);
169    });
170    $(".menu-icon .fa").click(function() {
171    	$("#menu").toggle();
172    });
173	$("#menu .uMenuRoot > li.uWithSubmenu > a > span").append('<i class="fa fa-angle-down"></fa>');
174	$("#menu .uMenuRoot > li.uWithSubmenu li.uWithSubmenu > a > span").append('<i class="fa fa-angle-right"></fa>');
175});

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.