PageSourceSearch

https://hometownheroesbanners.com/wp-content/plugins/blog-designer/public/js/designer.js?ver=1.0

js hometownheroesbanners.com collected 2026-10-08 23:39:21 UTC 10,338 bytes, 228 lines download raw bytes

1jQuery(document).ready(function($) {
2    if (jQuery('.masonry').length > 0) {
3        setTimeout(function() {
4            jQuery('.masonry').imagesLoaded(function() {
5                jQuery('.masonry').masonry({
6                    columnWidth: 0,
7                    itemSelector: '.blog_masonry_item',
8                    isResizable: true
9                });
10            });
11        }, 500);
12    }
13    $(document).on('click', '.social-component .bd-social-share', function(e) {
14        e.preventDefault();
15        if ($(this).data('share') == 'facebook') {
16            var $href = $(this).data('href');
17            var $url = $(this).data('url');
18
19            var $link = $href + '?u=' + $url;
20            window.open($link, 'targetWindow', 'width=800, height=400', 'toolbar=no', 'location=0', 'status=no', 'menubar=no', 'scrollbars=yes', 'resizable=yes');
21        }
22
23        if ($(this).data('share') == 'linkedin') {
24            var $href = $(this).data('href');
25            var $url = $(this).data('url');
26
27            var $link = $href + '?url=' + $url;
28            window.open($link, 'targetWindow', 'width=800, height=400', 'toolbar=no', 'location=0', 'status=no', 'menubar=no', 'scrollbars=yes', 'resizable=yes');
29        }
30
31        if ($(this).data('share') == 'twitter') {
32            var $href = $(this).data('href');
33            var $text = $(this).data('text');
34            var $url = $(this).data('url');
35
36            var $link = $href + '?text=' + $text + '&url=' + $url;
37            window.open($link, 'targetWindow', 'width=800, height=400', 'toolbar=no', 'location=0', 'status=no', 'menubar=no', 'scrollbars=yes', 'resizable=yes');
38        }
39
40        if ($(this).data('share') == 'pinterest') {
41            var $href = $(this).data('href');
42            var $url = $(this).data('url');
43            var $media = $(this).data('media');
44            var $description = $(this).data('description');
45
46            var $link = $href + '?url=' + $url + '&media=' + $media + '&description=' + $description;
47            window.open($link, 'targetWindow', 'width=800, height=400', 'toolbar=no', 'location=0', 'status=no', 'menubar=no', 'scrollbars=yes', 'resizable=yes');
48        }
49
50    });
51    //For load more functionality
52    jQuery(".bdp-load-more-btn").click(function() {
53        var $data = jQuery(this).closest('.bdp_wrapper').find('form#bdp-load-more-hidden').serialize();
54        console.log($data);
55        bdp_load_more_ajax($data);
56    });
57    bd_get_boxy_clean_height();
58    wpspw_pro_post_ticker_init();
59});
60jQuery(window).resize(function() {
61    bd_get_boxy_clean_height();
62});
63
64function bdp_load_more_ajax($data) {
65    var layout_id_class = ".bdp_wrapper";
66    var paged = parseInt(jQuery(layout_id_class + ' #bdp-load-more-hidden #paged').val());
67    var this_year = jQuery(layout_id_class + ' #bdp-load-more-hidden #this_year').val();
68    var $timeline_year = jQuery(layout_id_class + ' #bdp-load-more-hidden #timeline_previous_year').val();
69    paged = paged + 1;
70    var max_num_pages = parseInt(jQuery(layout_id_class + ' #bdp-load-more-hidden #max_num_pages').val());
71    jQuery(layout_id_class + ' .bdp-load-more-btn').addClass('loading');
72    jQuery(layout_id_class + ' .bdp-load-more-btn').fadeOut();
73
74    if (paged <= max_num_pages) {
75        jQuery(layout_id_class + ' .loading-image').fadeIn();
76        jQuery.ajax({
77            url: ajaxurl,
78            type: 'POST',
79            data: 'action=get_loadmore_blog&' + $data,
80            cache: false,
81            success: function(response) {
82                console.log(response);
83                var jsmasonry = jQuery(layout_id_class + " .bdp-load-more-pre").find("div");
84
85                // loop through each item to check when it animates
86
87                if (jsmasonry.hasClass('timeline_bg_wrap')) {
88                    jQuery(layout_id_class + ' div.timeline_back').append(response);
89                    var only_year = jQuery(layout_id_class + ' div.timeline_back').find('.timeline_year .only_year');
90                    jQuery(only_year).each(function() {
91                        $timeline_year = jQuery(this).text();
92                    });
93                    jQuery(layout_id_class + ' #bdp-load-more-hidden #timeline_previous_year').val(jQuery.trim($timeline_year));
94                } else if (jsmasonry.hasClass('glossary_cover')) {
95                    jQuery(layout_id_class + ' div.glossary_cover .bdp_glossary').append(response);
96                    jQuery('.masonry').imagesLoaded(function() {
97                        jQuery('.masonry').masonry('reloadItems');
98                        jQuery('.masonry').masonry('layout');
99                    })
100                } else if (jsmasonry.hasClass('boxy-clean')) {
101                    jQuery(layout_id_class + ' .blog_template.boxy-clean > ul').append(response);
102                    bd_get_boxy_clean_height();
103                } else if (jsmasonry.hasClass('media-grid')) {
104                    jQuery(layout_id_class + ' .media-grid-wrapper').append(response);
105                } else if (jsmasonry.hasClass('blog-grid-box')) {
106                    jQuery(layout_id_class + ' .blog_template.blog-grid-box').append(response);
107                } else {
108                    jQuery(layout_id_class + ' div.bdp-load-more-pre').append(response);
109                }
110
111                jQuery(layout_id_class + ' .bdp-load-more-btn').removeClass('loading');
112                jQuery(layout_id_class + ' .loading-image').fadeOut();
113                jQuery(layout_id_class + ' .bdp-load-more-btn').fadeIn();
114                jQuery(layout_id_class + ' #bdp-load-more-hidden #paged').val(paged);
115                jQuery(layout_id_class + ' .edd-no-js').hide();
116                if (paged == max_num_pages)
117                    jQuery(layout_id_class + ' .bdp-load-more-btn').fadeOut();
118            }
119        });
120    }
121    return false;
122}
123
124function bd_get_boxy_clean_height() {
125    var divs = jQuery(".boxy-clean li.blog_wrap").not('.first_post');
126    if (jQuery(window).width() > 980) {
127        var column = 4;
128        if (divs.hasClass('three_column')) {
129            column = 3;
130        } else if (divs.hasClass('two_column')) {
131            column = 2;
132        } else if (divs.hasClass('one_column')) {
133            column = 1;
134        }
135    } else if (jQuery(window).width() <= 980 && jQuery(window).width() > 720) {
136        var column = 4;
137        if (divs.hasClass('three_column_ipad')) {
138            column = 3;
139        } else if (divs.hasClass('two_column_ipad')) {
140            column = 2;
141        } else if (divs.hasClass('one_column_ipad')) {
142            column = 1;
143        }
144    } else if (jQuery(window).width() <= 720 && jQuery(window).width() > 480) {
145        var column = 4;
146        if (divs.hasClass('three_column_tablet')) {
147            column = 3;
148        } else if (divs.hasClass('two_column_tablet')) {
149            column = 2;
150        } else if (divs.hasClass('one_column_tablet')) {
151            column = 1;
152        }
153    } else if (jQuery(window).width() <= 480) {
154        var column = 4;
155        if (divs.hasClass('one_column_mobile')) {
156            column = 3;
157        } else if (divs.hasClass('two_column_mobile')) {
158            column = 2;
159        } else if (divs.hasClass('three_column_mobile')) {
160            column = 1;
161        }
162    }
163    jQuery(".boxy-clean li.blog_wrap").removeAttr('style');
164
165    for (var i = 0; i < divs.length; i += column) {
166        var heights = jQuery(".boxy-clean li.blog_wrap").not('.first_post').slice(i, i + column).map(function() {
167            return jQuery(this).height();
168        }).get();
169        var maxHeight = Math.max.apply(null, heights);
170        if (screen.width > 640) {
171            jQuery(".boxy-clean li.blog_wrap").not('.first_post').slice(i, i + column).css('height', maxHeight + 30);
172        }
173    }
174}
175
176function wpspw_pro_post_ticker_init() {
177
178    jQuery(".blog-ticker-wrapper").each(function() {
179        var bdsc = {
180            "is_rtl": "0",
181            "no_post_msg": "Sorry, No more post to display."
182        };
183        var s = jQuery(this).attr("id"),
184            t = JSON.parse(jQuery(this).attr("data-conf"));
185        void 0 !== s && "" != s && "undefined" != t && ("italic" == t.font_style && jQuery(this).addClass("blog-ticker-italic"), "bold" == t.font_style && jQuery(this).addClass("bd-bold"), "bold-italic" == t.font_style && jQuery(this).addClass("bd-bold blog-ticker-italic"), jQuery("#" + s).breakingNews({ direction: 1 == bdsc.is_rtl ? "rtl" : "ltr", effect: t.ticker_effect, delayTimer: parseInt(t.speed), scrollSpeed: parseInt(t.scroll_speed), borderWidth: "false" == t.border ? "0px" : "2px", radius: "2px", play: "false" != t.autoplay, stopOnHover: !0 }))
186    })
187}
188
189jQuery(document).ready(function() {
190    var icon_element = jQuery('.slides.design2 .mauthor .author');
191    var date_element = jQuery('.slides.design2 .post-date .mdate');
192    icon_element.each(function() {
193        if (jQuery(this).find('i')) {
194            jQuery(this).find('i').remove();
195            jQuery(this).prepend('By');
196        }
197    });
198    date_element.each(function() {
199        if (jQuery(this).find('i')) {
200            jQuery(this).find('i').remove();
201            jQuery(this).prepend('/');
202        }
203    })
204});
205jQuery(document).ready(function() {
206    var element = jQuery('.blog_template.blog-carousel');
207    if (element) {
208        element.parent().addClass('blog-carousel');
209    }
210    var element_grid_box = jQuery('.blog_template.blog-grid-box');
211    var parent_element = jQuery('.bdp_wrapper');
212    if (element_grid_box.length > 0) {
213        parent_element.addClass('blog-grid-box');
214    }
215    jQuery('.blog_template.blog-carousel .slides li').each(function() {
216        if (jQuery(this).find('.bdp-post-image a').length == 0) {
217            jQuery(this).find('.blog_header').css('margin-top', '0px');
218        }
219    });
220    
221    if( jQuery(window).width() < 481 ) {
222        jQuery('.blog_template.boxy-clean .blog_wrap.bdp_blog_template').each(function() {
223            if (jQuery(this).find('.post-media img').length == 0) {
224                jQuery(this).find('.author').hide();
225            }
226        });
227    }
228});

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.