PageSourceSearch

https://graylingsociety.org/wp-content/themes/bimber/js/single.js?ver=9.2.5

js graylingsociety.org collected 2026-10-01 10:25:51 UTC 26,260 bytes, 883 lines download raw bytes

1/*************************
2 *
3 * Custom Share Buttons
4 * (open in a new window)
5 *
6 *************************/
7
8(function ($) {
9
10    'use strict';
11
12    g1.customShareButtons = function () {
13        openCustomSharesInNewWindow();
14    };
15
16    function openCustomSharesInNewWindow () {
17        $('.mashicon-pinterest, .mashicon-google').click( function(e) {
18            var winWidth = 750;
19            var winHeight = 550;
20            var winTop = (screen.height / 2) - (winHeight / 2);
21            var winLeft = (screen.width / 2) - (winWidth / 2);
22            var url = $(this).attr('href');
23
24            // Since Mashshare v3.2.8.
25            if ('#' === url) {
26                url = $(this).attr('data-mashsb-url');
27            }
28
29            window.open(
30                url,
31                'sharer',
32                'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight
33            );
34
35            e.preventDefault();
36        });
37    }
38
39    $('body').on('g1NewContentLoaded', function(){
40        if (typeof lashare_fb == "undefined" && typeof mashsb !== 'undefined') {
41            $('.mashicon-facebook').click(function (mashfb) {
42                var winWidth = 520;
43                var winHeight = 550;
44                var winTop = (screen.height / 2) - (winHeight / 2);
45                var winLeft = (screen.width / 2) - (winWidth / 2);
46                var url = $(this).attr('href');
47                window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight);
48                mashfb.preventDefault(mashfb);
49                return false;
50            });
51        }
52        if (typeof mashsb !== 'undefined') {
53            $('.mashicon-twitter').click(function (e) {
54                var winWidth = 520;
55                var winHeight = 350;
56                var winTop = (screen.height / 2) - (winHeight / 2);
57                var winLeft = (screen.width / 2) - (winWidth / 2);
58                var url = $(this).attr('href');
59                // deprecated and removed because TW popup opens twice
60                if (mashsb.twitter_popup === '1') {
61                    window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight);
62                }
63                e.preventDefault();
64                return false;
65            });
66        }
67    });
68
69
70})(jQuery);
71
72/***************************
73 *
74 * Customize Share Buttons
75 * (open in a new window)
76 *
77 ***************************/
78
79(function ($) {
80
81    'use strict';
82
83    g1.customizeShareButtons = function () {
84        overrideOnOffSwitch();
85        subscribeViaMailbox();
86    };
87
88    function overrideOnOffSwitch () {
89        // disable current events
90        var $onoffswitch    = $('.onoffswitch');
91        var $onoffswitch2   = $('.onoffswitch2');
92
93        $onoffswitch.off('click');
94        $onoffswitch2.off('click');
95
96        $onoffswitch.on('click', function() {
97            var $container = $(this).parents('.mashsb-container');
98
99            $('.onoffswitch', $container).hide();
100            $('.secondary-shares', $container).show();
101            $('.onoffswitch2', $container).show();
102        });
103
104        $onoffswitch2.on('click', function() {
105            var $container = $(this).parents('.mashsb-container');
106
107            $('.onoffswitch', $container).show();
108            $('.secondary-shares', $container).hide();
109        });
110    }
111
112    function subscribeViaMailbox () {
113        // Skip if subscription is done via content box.
114        if (typeof mashsb !== 'undefined' && mashsb.subscribe === 'content') {
115            return;
116        }
117
118        // Skip if subsciption is done via custom url.
119        if (typeof mashsb !== 'undefined' && mashsb.subscribe_url !== '') {
120            return;
121        }
122
123        // Open default mail client to subscribe.
124        $('a.mashicon-subscribe').each(function () {
125            var $link = $(this);
126
127            if ($link.attr('href') === '#') {
128                // remove all assigned events
129                $link.off('click');
130
131                var postTitle = $('head > title').text();
132                var postUrl = location.href;
133
134                var subject = g1.config.i18n.newsletter.subscribe_mail_subject_tpl.replace('%subject%', postTitle);
135                var body = postTitle + '%0A%0A' + postUrl;
136
137                // template
138                var mailTo = 'mailto:?subject={subject}&body={body}';
139
140                // build final link
141                mailTo = mailTo.replace('{subject}', subject);
142                mailTo = mailTo.replace('{body}', body);
143
144                $link.attr('href', mailTo);
145            }
146        });
147    }
148
149})(jQuery);
150
151/*************
152 *
153 * Share Bar
154 *
155 *************/
156
157(function ($) {
158
159    'use strict';
160
161    g1.shareBarTopOffsetSelectors = [
162        '#wpadminbar'
163    ];
164
165    g1.shareBar = function () {
166        var $shareBar = g1.activateShareBar();
167
168        $('body').on('g1PageHeightChanged', function () {
169            if ($shareBar !== false) {
170                g1.updateShareBarPosition($shareBar);
171            }
172        });
173
174        enquire.register('screen and ( min-width: 801px )', {
175            match : function() {
176                if ($shareBar !== false) {
177                    g1.updateShareBarPosition($shareBar);
178                }
179            },
180            unmatch: function() {
181                if ($shareBar !== false) {
182                    g1.updateShareBarPosition($shareBar);
183                }
184            }
185        });
186    };
187
188    g1.activateShareBar = function () {
189        var $shareBar = $('.g1-sharebar');
190        var $shareButtons = $('.mashsb-main:first');
191
192        // exit if any of required elements not exists
193        if ($shareBar.length === 0 || $shareButtons.length === 0) {
194            return false;
195        }
196
197        var $shareBarInner = $shareBar.find('.g1-sharebar-inner');
198
199        if (!$shareBar.is('.g1-sharebar-loaded')) {
200            var $clonedShareButtons = $shareButtons.clone(true);
201            //$clonedShareButtons.removeClass('mashsb-main');
202
203            // If shares are animated, we need to set total count in sharebar before animation ends
204            if (typeof mashsb !== 'undefined' && mashsb.animate_shares === '1' && $clonedShareButtons.find('.mashsbcount').length) {
205                $clonedShareButtons.find('.mashsbcount').text(mashsb.shares);
206            }
207
208            $shareBarInner.append($clonedShareButtons);
209
210            $shareBar.addClass('g1-sharebar-loaded');
211
212            g1.updateShareBarPosition($shareBar);
213        }
214
215        new Waypoint({
216            element: $('body'),
217            handler: function (direction) {
218                if (direction === 'down') {
219                    $shareBar.addClass('g1-sharebar-on');
220                    $shareBar.removeClass('g1-sharebar-off');
221                } else {
222                    $shareBar.removeClass('g1-sharebar-on');
223                    $shareBar.addClass('g1-sharebar-off');
224                }
225            },
226            offset: function() {
227                // trigger waypoint when body is scrolled down by 100px
228                return -100;
229            }
230        });
231
232        return $shareBar;
233    };
234
235    g1.updateShareBarPosition = function ($shareBar) {
236        var shareBarWidth = parseInt($shareBar.outerWidth(), 10);
237        var cssMediaQueryBreakpoint = 800;
238
239        // Below breakpoint value, sticky is placed on bottom so top has to be reset.
240        if (shareBarWidth <= cssMediaQueryBreakpoint) {
241            $shareBar.css('top', '');
242        } else {
243            var top = 0;
244
245            for (var i = 0; i < g1.shareBarTopOffsetSelectors.length; i++) {
246                var $element = $(g1.shareBarTopOffsetSelectors[i]);
247
248                if ($element.length > 0 && $element.is(':visible')) {
249                    top += parseInt($element.outerHeight(), 10);
250                }
251            }
252
253            $shareBar.css('top', top + 'px');
254        }
255    };
256
257})(jQuery);
258
259/**********************
260 *
261 * Bimber Load Next Post
262 *
263 **********************/
264
265(function ($) {
266
267    'use strict';
268
269    g1.loadNextPostConfig = {
270        'offset': '500%'
271    };
272
273    var selectors = {
274        'button' :       '.bimber-load-next-post',
275        'urlWaypoint':   '.bimber-url-waypoint',
276        'elementButton': '.g1-auto-load-button'
277    };
278
279    g1.loadNextPost = function () {
280
281        var mainUrl = window.location.href;
282        var autoLoadLimit = g1.config.auto_load_limit;
283        var loadedPosts = 0;
284
285        var loadNextEvent = function(e){
286
287            e.preventDefault();
288
289            if (autoLoadLimit > 0 && loadedPosts >= autoLoadLimit){
290                $(this).remove();
291                return;
292            }
293
294            var $button = $(this);
295            var template = 'classic';
296            if($('#secondary').length === 0){
297                template = 'row';
298            }
299            $button.css('position','relative');
300            $button.addClass('g1-collection-more-loading');
301            var postUrl = $('a', this).attr('href');
302            var gaPostUrl = $('a', this).attr('data-bimber-analytics-href');
303            var url = postUrl + '?bimber_auto_load_next_post_template=' + template;
304
305            $('a', this).remove();
306
307            // load page
308            var xhr = $.get(url);
309            loadedPosts += 1;
310
311            // on success
312            xhr.done(function (data) {
313                var $html = $($.parseHTML(data, document, true));
314                var $content = $html.find('#content');
315                var title = $($content.find('.entry-title')[0]).text();
316                $content.find('#secondary').remove();
317
318                // If there are insta embeds BEFORE the load, we will force to refresh them AFTER the load
319                var $insta = $('script[src="//platform.instagram.com/en_US/embeds.js"]');
320
321                // make sure that mejs is loaded
322                var mejsLoaded = typeof window.wp !== 'undefined' && typeof window.wp.mediaelement !== 'undefined';
323
324                if (!mejsLoaded) {
325                    var matches = data.match(/<script(.|\n)*?<\/script>/g);
326                    var mejsCode = '';
327                    matches.forEach(function( match ) {
328                        if ( match.indexOf('mejs') > 0 || match.indexOf('mediaelement') > 0 ){
329                            match = match.replace('<script','<script async');
330                            mejsCode+=match;
331                        }
332                    });
333                    matches = data.match(/<link(.|\n)*?\/>/g);
334                    matches.forEach(function( match ) {
335                        if ( match.indexOf('mejs') > 0 || match.indexOf('mediaelement') > 0 ){
336                            mejsCode+=match;
337                        }
338                    });
339                    $button.after(mejsCode);
340                }
341                $button.before('<div class="g1-divider"></div>');
342
343                $('body').trigger( 'g1BeforeNewContentReady', [ $content ] );
344
345                // @todo
346                var $scope = $($content.html()).insertAfter($button);
347
348                if ( $insta.length > 0) {
349                    window.instgrm.Embeds.process();
350                }
351
352                $button.remove();
353
354                $('body').trigger( 'g1NewContentLoaded', [ $scope ] );
355
356                // MEJS loaded, so run init.
357                if (typeof window.wp !== 'undefined' && typeof window.wp.mediaelement !== 'undefined') {
358                    window.wp.mediaelement.initialize();
359                }
360
361                // Google Analytics.
362                if ( typeof ga !== 'undefined' && typeof ga.getAll !== 'undefined') {
363                    ga('create', ga.getAll()[0].get('trackingId'), 'auto');
364                    ga('set', { location: gaPostUrl, title: title });
365                    ga('send', 'pageview');
366                }
367
368                // WPP Ajax.
369                var $nonce = $html.find('#bimber-wpp-nonce');
370                if ($nonce.length>0){
371                    var nonce  = $nonce.attr('data-bimber-wpp-nonce');
372                    var postId = $nonce.attr('data-bimber-wpp-id');
373                    g1.updatePostViews(nonce,postId);
374                }
375                bindEvents();
376            });
377
378            xhr.always(function () {
379                $button.removeClass('g1-collection-more-loading');
380            });
381        };
382
383        var bindEvents = function() {
384            $(selectors.button).click(loadNextEvent);
385
386            $(selectors.elementButton).click(function(){
387                window.history.replaceState( {} , '', mainUrl );
388            });
389
390            $(selectors.button).waypoint(function(direction) {
391                if('down' === direction) {
392                    $(selectors.button).trigger('click');
393                }
394            }, {
395                offset: g1.loadNextPostConfig.offset
396            });
397
398            $(selectors.urlWaypoint).waypoint(function(direction) {
399                var $waypoint = $(this.element);
400                if('up' === direction) {
401                    var $waypointUp = $waypoint.parent('article').prev('.bimber-url-waypoint');
402                    if ($waypointUp.length > 0){
403                        $waypoint = $waypointUp;
404                    }
405                }
406
407                var url = $waypoint.attr('data-bimber-post-url');
408                var title = $waypoint.attr('data-bimber-post-title');
409                var currentUrl = window.location.href;
410                if ( url !== currentUrl ){
411                    var $article = $waypoint.next('article');
412
413                    // Mashshare.
414                    var $mashShare = $('.mashsb-container', $article);
415                    var $shareBar = $('.g1-sharebar .g1-sharebar-inner');
416                    if ( $mashShare.length >0 && $.trim($shareBar.html())) {
417                        $shareBar.html($mashShare[0].outerHTML);
418                    }
419
420                    // ESSB.
421                    var $essbShare = $('.essb_topbar_inner', $article);
422                    var $essbBar = $('.essb_topbar_inner');
423                    if ( $essbShare.length >0 && $.trim($essbBar.html())) {
424                        $essbBar.html($essbShare[0].outerHTML);
425                    }
426
427                    g1.customizeShareButtons();
428                    window.history.replaceState( {} , '', url );
429                    document.title = title;
430                }
431            });
432        };
433
434        bindEvents();
435    };
436
437})(jQuery);
438
439/*************
440 *
441 * Comments
442 *
443 ************/
444
445(function ($) {
446
447    'use strict';
448
449    var selectors = {
450        'wrapper':      '.g1-comments',
451        'tabs':         '.g1-tab-items > li',
452        'tab':          '.g1-tab-item',
453        'currentTab':   '.g1-tab-item-current',
454        'commentType':  '.g1-comment-type'
455    };
456
457    var classes = {
458        'currentTab':   'g1-tab-item-current',
459        'currentType':  'g1-tab-pane-current',
460        'type':         'g1-tab-pane',
461        'loading':      'g1-loading',
462        'loaded':       'g1-loaded'
463    };
464
465    var $wrapper;
466
467    g1.comments = function () {
468        $wrapper = $(selectors.wrapper);
469
470        if ($wrapper.length === 0) {
471            return;
472        }
473
474        // Skip if CommentsAce in use.
475        if ($wrapper.find('.cace-comments').length > 0) {
476            return;
477        }
478
479        g1.facebookComments();
480        g1.disqusComments();
481
482        initTabs();
483    };
484
485    var initTabs = function() {
486        var $tabs = $wrapper.find(selectors.tabs);
487        var currentType = $tabs.filter(selectors.currentTab).attr('data-bimber-type');
488
489        // Can't find current tab.
490        if (!currentType) {
491            var types = g1.config.comment_types;
492
493            if (types && types.length > 0) {
494                currentType = types[0];
495            } else {
496                currentType = 'wp';
497            }
498        }
499
500        $wrapper.find(selectors.commentType).each(function() {
501            var $type = $(this);
502
503            $type.addClass(classes.type);
504        });
505
506        if ( 'dsq' === currentType ) {
507            setTimeout(function() {
508                selectTab(currentType);
509            }, 1000);
510        } else {
511            selectTab(currentType);
512        }
513
514        $tabs.on('click', function() {
515            var type = $(this).attr('data-bimber-type');
516
517            selectTab(type);
518        });
519    };
520
521    var selectTab = function(type) {
522        var $tab = $wrapper.find(selectors.tab + '-' + type);
523        var $type = $wrapper.find(selectors.commentType + '-' + type);
524
525        //if ($type.hasClass(classes.currentType)) {
526        //    return;
527        //}
528
529        if ('fb' === type) {
530            if (!$type.hasClass(classes.loaded)) {
531                $type.addClass(classes.loading);
532            }
533        }
534
535        // Select new type.
536        $wrapper.find(selectors.commentType).removeClass(classes.currentType);
537        $type.addClass(classes.currentType);
538
539        $type.trigger('loadComments');
540
541        // Select new tab.
542        $wrapper.find(selectors.tabs).removeClass(classes.currentTab);
543        $tab.addClass(classes.currentTab);
544    };
545
546})(jQuery);
547
548/*******************
549 *
550 * Facebook Comments
551 * (plugin integration)
552 *
553 ******************/
554
555(function ($) {
556
557    'use strict';
558
559    var selectors = {
560        'wrapper':  '.g1-comment-type-fb',
561        'counter':  '.g1-comment-count',
562        'list':     '.g1-comment-list',
563        'tab':      '.g1-comments .g1-tab-item-fb'
564    };
565
566    var classes = {
567        'loading':  'g1-loading',
568        'loaded':   'g1-loaded'
569    };
570
571    var $wrapper;
572    var loaded = false;
573
574    g1.facebookComments = function () {
575        $wrapper = $(selectors.wrapper);
576
577        if (!$wrapper.is('.g1-on-demand')) {
578            loaded = true;
579        }
580
581        if ($wrapper.length > 0) {
582            init();
583
584            return $wrapper;
585        } else {
586            return false;
587        }
588    };
589
590    var init = function() {
591        // Init when FB is ready.
592        var origFbAsyncInit = window.fbAsyncInit;
593
594        window.fbAsyncInit = function() {
595            if (typeof FB === 'undefined') {
596                return;
597            }
598
599            // Update on post load.
600            FB.Event.subscribe('xfbml.render', function() {
601                $wrapper.removeClass(classes.loading);
602                $wrapper.addClass(classes.loaded);
603
604                var $counter = $wrapper.find(selectors.counter);
605
606                var url = $counter.find('.fb_comments_count').attr('data-bimber-graph-api-url');
607                FB.api(
608                    '/' + url,
609                    'GET',
610                    {'fields':'engagement'},
611                    function(response) {
612                        if(response.engagement) {
613                            var count = response.engagement.comment_plugin_count;
614                            $('.fb_comments_count').html(count);
615                        }
616                    }
617                );
618                var realCount = parseInt($counter.find('.fb_comments_count').text(), 10);
619                var postCount = parseInt($counter.attr('data-bimber-fb-comment-count'), 10);
620
621                if (realCount !== postCount) {
622                    save(realCount);
623                }
624            });
625
626            // New comment added.
627            FB.Event.subscribe('comment.create', function() {
628                changeCommentsNumber(1);
629            });
630
631            // Comment removed.
632            FB.Event.subscribe('comment.remove', function() {
633                changeCommentsNumber(-1);
634            });
635
636            if (typeof origFbAsyncInit === 'function') {
637                origFbAsyncInit();
638            }
639        };
640
641        // Listen on "Load comments" event.
642        $wrapper.on('loadComments', function() {
643            if (loaded) {
644                return;
645            }
646
647            $wrapper.addClass(classes.loading);
648
649            loadComments(function(html) {
650                g1.resetFacebookSDK();
651
652                $wrapper.find(selectors.list).html(html);
653                $wrapper.removeClass(classes.loading);
654            });
655        });
656    };
657
658    var changeCommentsNumber = function(diff) {
659        var $counter = $wrapper.find(selectors.counter);
660        var postCount = parseInt($counter.attr('data-bimber-fb-comment-count'), 10);
661
662        postCount += diff;
663
664        // Update Facebook comment count.
665        $wrapper.find('.fb_comments_count').text(postCount);
666        $counter.attr('data-bimber-fb-comment-count', postCount);
667
668        // Update total post comment count.
669        var $postCommentCount = $wrapper.parents('#content').find('.entry-comments-link strong');
670
671        var postCommentCount = parseInt($postCommentCount.text(), 10);
672        $postCommentCount.text(postCommentCount + diff);
673
674        // Update tab counter.s
675        var $fbCount = $(selectors.tab).find('a > span');
676
677        if ($fbCount.length > 0) {
678            var fbCount = parseInt($fbCount.text(), 10);
679
680            $fbCount.text(fbCount + diff);
681        }
682
683        save(postCount);
684    };
685
686    var save = function(newCount) {
687        var postId = $wrapper.find(selectors.counter).attr('data-bimber-post-id');
688        var nonce  = $wrapper.find(selectors.counter).attr('data-bimber-nonce');
689
690        $.ajax({
691            'type': 'POST',
692            'url': g1.config.ajax_url,
693            'dataType': 'json',
694            'data': {
695                'action':   'bimber_update_fb_comment_count',
696                'post_id':  postId,
697                'security': nonce,
698                'count':    newCount
699            }
700        });
701    };
702
703    var loadComments = function(callback) {
704        var postId = $wrapper.find(selectors.counter).attr('data-bimber-post-id');
705
706        var xhr = $.ajax({
707            'type': 'GET',
708            'url': g1.config.ajax_url,
709            'data': {
710                'action':   'bimber_load_fbcommentbox',
711                'post_id':  postId
712            }
713        });
714
715        xhr.done(function(res) {
716            callback(res);
717
718            loaded = true;
719        });
720    };
721
722})(jQuery);
723
724
725/**********************
726 *
727 * Disqus Comments
728 * (plugin integration)
729 *
730 *********************/
731
732(function ($) {
733
734    'use strict';
735
736    var selectors = {
737        'wrapper':  '.g1-comment-type-dsq',
738        'counter':  '.g1-comment-count',
739        'list':     '.g1-comment-list',
740        'tab':      '.g1-comments .g1-tab-item-dsq'
741    };
742
743    var classes = {
744        'loading':  'g1-loading'
745    };
746
747    var $wrapper;
748    var loaded = false;
749
750    g1.disqusComments = function () {
751        $wrapper = $(selectors.wrapper);
752
753        if ($wrapper.length > 0) {
754            init();
755
756            return $wrapper;
757        } else {
758            return false;
759        }
760    };
761
762    var init = function() {
763        var origDsqConfig = window.disqus_config;
764
765        window.disqus_config = function() {
766            if (typeof origDsqConfig === 'function') {
767                origDsqConfig();
768
769                $wrapper.removeClass(classes.loading);
770                loaded = true;
771            }
772
773            // DISQUSWIDGETS.getCount({reset: true});
774
775            // Init.
776            var $counter = $wrapper.find(selectors.counter);
777
778            var realCount = parseInt($counter.find('.disqus-comment-count').text(), 10);
779            var postCount = parseInt($counter.attr('data-bimber-dsq-comment-count'), 10);
780
781            if (realCount !== postCount) {
782                save(realCount);
783            }
784
785            this.callbacks.onNewComment = [function() {
786                changeCommentsNumber(1);
787            }];
788        };
789
790        // Listen on "Load comments" event.
791        $wrapper.on('loadComments', function() {
792            if (loaded) {
793                return;
794            }
795
796            $wrapper.addClass(classes.loading);
797
798            loadComments();
799        });
800    };
801
802    var changeCommentsNumber = function(diff) {
803        var $counter = $wrapper.find(selectors.counter);
804        var postCount = parseInt($counter.attr('data-bimber-dsq-comment-count'), 10);
805
806        postCount += diff;
807
808        // Update Facebook comment count.
809        $wrapper.find('.disqus-comment-count').text(postCount);
810        $counter.attr('data-bimber-dsq-comment-count', postCount);
811
812        // Update total post comment count.
813        var $postCommentCount = $wrapper.parents('#content').find('.entry-comments-link strong');
814
815        var postCommentCount = parseInt($postCommentCount.text(), 10);
816        $postCommentCount.text(postCommentCount + diff);
817
818        // Update tab counter.s
819        var $dsqCount = $(selectors.tab).find('a > span');
820
821        if ($dsqCount.length > 0) {
822            var dsqCount = parseInt($dsqCount.text(), 10);
823
824            $dsqCount.text(dsqCount + diff);
825        }
826
827        save(postCount);
828    };
829
830    var save = function(newCount) {
831        var postId = $wrapper.find(selectors.counter).attr('data-bimber-post-id');
832        var nonce  = $wrapper.find(selectors.counter).attr('data-bimber-nonce');
833
834        $.ajax({
835            'type': 'POST',
836            'url': g1.config.ajax_url,
837            'dataType': 'json',
838            'data': {
839                'action':   'bimber_dsq_update_comment_count',
840                'post_id':  postId,
841                'security': nonce,
842                'count':    newCount
843            }
844        });
845    };
846
847    var loadComments = function() {
848        var dsq = document.createElement('script');
849        dsq.type = 'text/javascript';
850        dsq.async = true;
851        dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
852        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
853    };
854
855})(jQuery);
856
857
858/**************************
859 *
860 * document ready functions
861 * (keep this at the end for
862 * better compatibillity
863 * with optimizing plugins)
864 *
865 *************************/
866
867(function ($) {
868
869    'use strict';
870
871    $(document).ready(function () {
872        g1.customShareButtons();
873        g1.customizeShareButtons();
874
875        if (g1.config.sharebar === 'on') {
876            g1.shareBar();
877        }
878
879        g1.comments();
880        g1.loadNextPost();
881    });
882
883})(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.