PageSourceSearch

https://irodalmijelen.hu/themes/custom/re/js/onviewport.js?v=9.3.11

js irodalmijelen.hu collected 2026-10-02 07:59:50 UTC 4,341 bytes, 107 lines download raw bytes

1(function($){"use strict";
2
3  /**
4   * Copyright 2012, Digital Fusion
5   * Licensed under the MIT license.
6   * http://teamdf.com/jquery-plugins/license/
7   *
8   * @author Sam Sehnert
9   * @desc A small plugin that checks whether elements are within
10   *     the user visible viewport of a web browser.
11   *     only accounts for vertical position, not horizontal.
12   */
13
14  $.fn.visible = function(partial) {
15    if (typeof ($(this).offset()) !== 'undefined') {
16        
17        var $t            = $(this),
18          $w            = $(window),
19          viewTop       = $w.scrollTop(),
20          viewBottom    = viewTop + $w.height(),
21          _top          = $t.offset().top,
22          _bottom       = _top + $t.height(),
23          compareTop    = partial === true ? _bottom : _top,
24          compareBottom = partial === true ? _top : _bottom;
25        
26        return (((compareBottom <= viewBottom) && (compareTop >= viewTop)) || ((compareBottom <= viewBottom) && (compareTop >= viewTop)));
27    }
28
29  };
30  jQuery(document).ready(function($) {
31    
32        var bkWindow = $(window),
33            bkRatingBars = $('.bk-overlay').find('.bk-zero-trigger'),
34            bkthumbnail, bkcalendarmeta;
35        
36        $('#body-wrapper').imagesLoaded(function(){
37            setTimeout(function() {
38                bkthumbnail = $('#page-wrap').find('.thumb');
39                $.each(bkthumbnail, function(i, value) {
40                    var bkValue = $(value);
41                    if (( bkValue.visible(true) )&& ( bkValue.hasClass('hide-thumb'))) {
42                        bkValue.removeClass('hide-thumb');                
43                    } 
44                });
45                bkcalendarmeta = $('#page-wrap').find('.bk-calendar-meta');
46                $.each(bkcalendarmeta, function(i, value) {
47                    var bkCalendarMeta = $(value);
48                    if (( bkCalendarMeta.visible(true) )&& ( bkCalendarMeta.hasClass('bk-hide-calendar'))) {
49                        bkCalendarMeta.removeClass('bk-hide-calendar');                
50                    } 
51                });
52                $.each(bkRatingBars, function(i, value) {
53                    var bkValue = $(value);
54                    if ( bkValue.visible(true) ) {
55                        bkValue.removeClass('bk-zero-trigger'); 
56                        bkValue.addClass('bk-bar-ani'); 
57                   
58                    } 
59                });
60            },1200);
61        });   
62     
63        setTimeout(function() {
64            bkWindow.scroll(function(event) {
65                bkthumbnail = $('#page-wrap').find('.thumb');
66                $.each(bkthumbnail, function(i, value) {
67                    var bkValue = $(value);
68                    if ( ( bkValue.visible(true) ) && ( bkValue.hasClass('hide-thumb') ) ) {
69                        bkValue.removeClass('hide-thumb');  
70                    } 
71                });    
72                bkcalendarmeta = $('#page-wrap').find('.bk-calendar-meta');
73                $.each(bkcalendarmeta, function(i, value) {
74                    var bkCalendarMeta = $(value);
75                    if (( bkCalendarMeta.visible(true) )&& ( bkCalendarMeta.hasClass('bk-hide-calendar'))) {
76                        bkCalendarMeta.removeClass('bk-hide-calendar');                
77                    } 
78                }); 
79                $.each(bkRatingBars, function(i, value) {
80                    var bkValue = $(value);
81                    if ( ( bkValue.visible(true) ) && ( bkValue.hasClass('bk-zero-trigger') ) ) {
82        
83                      bkValue.removeClass('bk-zero-trigger'); 
84                      bkValue.addClass('bk-bar-ani'); 
85                    } 
86                });
87            });
88        },2000);  
89        
90          	/* Show bottom single post recommend box */
91    	if ($('.recommend-box')[0]) {
92    		var random_post = $('.recommend-box');
93            bkWindow.scroll(function(event) {
94        		if ($('.footer').visible(true)){
95        			random_post.addClass('recommend-box-on');
96        		} else {
97        			random_post.removeClass('recommend-box-on');
98        		}
99            });
100    		
101    		$('.recommend-box .close').on("click", function(e){
102    			e.preventDefault();
103    			$('.recommend-box').toggleClass('recommend-box-on recommend-box-off');
104    		});
105    	}
106    }); 
107})(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.