1(function($){'use strict';g1.customShareButtons=function(){openCustomSharesInNewWindow()};function openCustomSharesInNewWindow(){$('.mashicon-pinterest, .mashicon-google').click(function(e){var winWidth=750;var winHeight=550;var winTop=(screen.height/2)-(winHeight/2);var winLeft=(screen.width/2)-(winWidth/2);var url=$(this).attr('href');if('#'===url){url=$(this).attr('data-mashsb-url')} 2window.open(url,'sharer','top='+winTop+',left='+winLeft+',toolbar=0,status=0,width='+winWidth+',height='+winHeight);e.preventDefault()})} 3$('body').on('g1NewContentLoaded',function(){if(typeof lashare_fb=="undefined"&&typeof mashsb!=='undefined'){$('.mashicon-facebook').click(function(mashfb){var winWidth=520;var winHeight=550;var winTop=(screen.height/2)-(winHeight/2);var winLeft=(screen.width/2)-(winWidth/2);var url=$(this).attr('href');window.open(url,'sharer','top='+winTop+',left='+winLeft+',toolbar=0,status=0,width='+winWidth+',height='+winHeight);mashfb.preventDefault(mashfb);return!1})} 4if(typeof mashsb!=='undefined'){$('.mashicon-twitter').click(function(e){var winWidth=520;var winHeight=350;var winTop=(screen.height/2)-(winHeight/2);var winLeft=(screen.width/2)-(winWidth/2);var url=$(this).attr('href');if(mashsb.twitter_popup==='1'){window.open(url,'sharer','top='+winTop+',left='+winLeft+',toolbar=0,status=0,width='+winWidth+',height='+winHeight)} 5e.preventDefault();return!1})}})})(jQuery);(function($){'use strict';g1.customizeShareButtons=function(){overrideOnOffSwitch();subscribeViaMailbox()};function overrideOnOffSwitch(){var $onoffswitch=$('.onoffswitch');var $onoffswitch2=$('.onoffswitch2');$onoffswitch.off('click');$onoffswitch2.off('click');$onoffswitch.on('click',function(){var $container=$(this).parents('.mashsb-container');$('.onoffswitch',$container).hide();$('.secondary-shares',$container).show();$('.onoffswitch2',$container).show()});$onoffswitch2.on('click',function(){var $container=$(this).parents('.mashsb-container');$('.onoffswitch',$container).show();$('.secondary-shares',$container).hide()})} 6function subscribeViaMailbox(){if(typeof mashsb!=='undefined'&&mashsb.subscribe==='content'){return} 7if(typeof mashsb!=='undefined'&&mashsb.subscribe_url!==''){return} 8$('a.mashicon-subscribe').each(function(){var $link=$(this);if($link.attr('href')==='#'){$link.off('click');var postTitle=$('head > title').text();var postUrl=location.href;var subject=g1.config.i18n.newsletter.subscribe_mail_subject_tpl.replace('%subject%',postTitle);var body=postTitle+'%0A%0A'+postUrl;var mailTo='mailto:?subject={subject}&body={body}';mailTo=mailTo.replace('{subject}',subject);mailTo=mailTo.replace('{body}',body);$link.attr('href',mailTo)}})}})(jQuery);(function($){'use strict';g1.shareBarTopOffsetSelectors=['#wpadminbar'];g1.shareBar=function(){var $shareBar=g1.activateShareBar();$('body').on('g1PageHeightChanged',function(){if($shareBar!==!1){g1.updateShareBarPosition($shareBar)}});enquire.register('screen and ( min-width: 801px )',{match:function(){if($shareBar!==!1){g1.updateShareBarPosition($shareBar)}},unmatch:function(){if($shareBar!==!1){g1.updateShareBarPosition($shareBar)}}})};g1.activateShareBar=function(){var $shareBar=$('.g1-sharebar');var $shareButtons=$('.mashsb-main:first');if($shareBar.length===0||$shareButtons.length===0){return!1} 9var $shareBarInner=$shareBar.find('.g1-sharebar-inner');if(!$shareBar.is('.g1-sharebar-loaded')){var $clonedShareButtons=$shareButtons.clone(!0);if(typeof mashsb!=='undefined'&&mashsb.animate_shares==='1'&&$clonedShareButtons.find('.mashsbcount').length){$clonedShareButtons.find('.mashsbcount').text(mashsb.shares)} 10$shareBarInner.append($clonedShareButtons);$shareBar.addClass('g1-sharebar-loaded');g1.updateShareBarPosition($shareBar)} 11new Waypoint({element:$('body'),handler:function(direction){if(direction==='down'){$shareBar.addClass('g1-sharebar-on');$shareBar.removeClass('g1-sharebar-off')}else{$shareBar.removeClass('g1-sharebar-on');$shareBar.addClass('g1-sharebar-off')}},offset:function(){return-100}});return $shareBar};g1.updateShareBarPosition=function($shareBar){var shareBarWidth=parseInt($shareBar.outerWidth(),10);var cssMediaQueryBreakpoint=800;
11if(shareBarWidth<=cssMediaQueryBreakpoint){$shareBar.css('top','')}else{var top=0;for(var i=0;i<g1.shareBarTopOffsetSelectors.length;i++){var $element=$(g1.shareBarTopOffsetSelectors[i]);if($element.length>0&&$element.is(':visible')){top+=parseInt($element.outerHeight(),10)}} 12$shareBar.css('top',top+'px')}}})(jQuery);(function($){'use strict';g1.loadNextPostConfig={'offset':'500%'};var selectors={'button':'.bimber-load-next-post','urlWaypoint':'.bimber-url-waypoint','elementButton':'.g1-auto-load-button'};g1.loadNextPost=function(){var mainUrl=window.location.href;var autoLoadLimit=g1.config.auto_load_limit;var loadedPosts=0;var loadNextEvent=function(e){e.preventDefault();if(autoLoadLimit>0&&loadedPosts>=autoLoadLimit){$(this).remove();return} 13var $button=$(this);var template='classic';if($('#secondary').length===0){template='row'} 14$button.css('position','relative');$button.addClass('g1-collection-more-loading');var postUrl=$('a',this).attr('href');var gaPostUrl=$('a',this).attr('data-bimber-analytics-href');var url=postUrl+'?bimber_auto_load_next_post_template='+template;$('a',this).remove();var xhr=$.get(url);loadedPosts+=1;xhr.done(function(data){var $html=$($.parseHTML(data,document,!0));var $content=$html.find('#content');var title=$($content.find('.entry-title')[0]).text();$content.find('#secondary').remove();var $insta=$('script[src="//platform.instagram.com/en_US/embeds.js"]');if(typeof window.wp.mediaelement==='undefined'){var matches=data.match(/<script(.|\n)*?<\/script>/g);var mejsCode='';matches.forEach(function(match){if(match.indexOf('mejs')>0||match.indexOf('mediaelement')>0){match=match.replace('<script','<script async');mejsCode+=match}});matches=data.match(/<link(.|\n)*?\/>/g);matches.forEach(function(match){if(match.indexOf('mejs')>0||match.indexOf('mediaelement')>0){mejsCode+=match}});$button.after(mejsCode)} 15$button.before('<div class="g1-divider"></div>');$('body').trigger('g1BeforeNewContentReady',[$content]);var $scope=$($content.html()).insertAfter($button);if($insta.length>0){window.instgrm.Embeds.process()} 16$button.remove();$('body').trigger('g1NewContentLoaded',[$scope]);if(typeof window.wp.mediaelement!=='undefined'){window.wp.mediaelement.initialize()} 17if(typeof ga!=='undefined'&&typeof ga.getAll!=='undefined'){ga('create',ga.getAll()[0].get('trackingId'),'auto');ga('set',{location:gaPostUrl,title:title});ga('send','pageview')} 18var $nonce=$html.find('#bimber-wpp-nonce');if($nonce.length>0){var nonce=$nonce.attr('data-bimber-wpp-nonce');var postId=$nonce.attr('data-bimber-wpp-id');g1.updatePostViews(nonce,postId)} 19bindEvents()});xhr.always(function(){$button.removeClass('g1-collection-more-loading')})};var bindEvents=function(){$(selectors.button).click(loadNextEvent);$(selectors.elementButton).click(function(){window.history.replaceState({},'',mainUrl)});$(selectors.button).waypoint(function(direction){if('down'===direction){$(selectors.button).trigger('click')}},{offset:g1.loadNextPostConfig.offset});$(selectors.urlWaypoint).waypoint(function(direction){var $waypoint=$(this.element);if('up'===direction){var $waypointUp=$waypoint.parent('article').prev('.bimber-url-waypoint');if($waypointUp.length>0){$waypoint=$waypointUp}} 20var url=$waypoint.attr('data-bimber-post-url');var title=$waypoint.attr('data-bimber-post-title');var currentUrl=window.location.href;if(url!==currentUrl){var $article=$waypoint.next('article');var $mashShare=$('.mashsb-container',$article);var $shareBar=$('.g1-sharebar .g1-sharebar-inner');if($mashShare.length>0&&$.trim($shareBar.html())){$shareBar.html($mashShare[0].outerHTML)} 21var $essbShare=$('.essb_topbar_inner',$article);var $essbBar=$('.essb_topbar_inner');if($essbShare.length>0&&$.trim($essbBar.html())){$essbBar.html($essbShare[0].outerHTML)} 22g1.customizeShareButtons();window.history.replaceState({},'',url);document.title=title}})};bindEvents()}})(jQuery);(function($){'use strict';var selectors={'wrapper':'.g1-comments','tabs':'.g1-tab-items > li','tab':'.g1-tab-item','currentTab':'.g1-tab-item-current','commentType':'.g1-comment-type'};var classes={'currentTab':'g1-tab-item-current','currentType':'g1-tab-pane-current','type':'g1-tab-pane','loading':'g1-loading','loaded':'g1-loaded'};var $wrapper;
22g1.comments=function(){$wrapper=$(selectors.wrapper);if($wrapper.length===0){return} 23g1.facebookComments();g1.disqusComments();initTabs()};var initTabs=function(){var $tabs=$wrapper.find(selectors.tabs);var currentType=$tabs.filter(selectors.currentTab).attr('data-bimber-type');if(!currentType){var types=g1.config.comment_types;if(types&&types.length>0){currentType=types[0]}else{currentType='wp'}} 24$wrapper.find(selectors.commentType).each(function(){var $type=$(this);$type.addClass(classes.type)});if('dsq'===currentType){setTimeout(function(){selectTab(currentType)},1000)}else{selectTab(currentType)} 25$tabs.on('click',function(){var type=$(this).attr('data-bimber-type');selectTab(type)})};var selectTab=function(type){var $tab=$wrapper.find(selectors.tab+'-'+type);var $type=$wrapper.find(selectors.commentType+'-'+type);if('fb'===type){if(!$type.hasClass(classes.loaded)){$type.addClass(classes.loading)}} 26$wrapper.find(selectors.commentType).removeClass(classes.currentType);$type.addClass(classes.currentType);$type.trigger('loadComments');$wrapper.find(selectors.tabs).removeClass(classes.currentTab);
26$tab.addClass(classes.currentTab)}})(jQuery);(function($){'use strict';var selectors={'wrapper':'.g1-comment-type-fb','counter':'.g1-comment-count','list':'.g1-comment-list','tab':'.g1-comments .g1-tab-item-fb'};var classes={'loading':'g1-loading','loaded':'g1-loaded'};var $wrapper;var loaded=!1;g1.facebookComments=function(){$wrapper=$(selectors.wrapper);if(!$wrapper.is('.g1-on-demand')){loaded=!0} 27if($wrapper.length>0){init();return $wrapper}else{return!1}};var init=function(){var origFbAsyncInit=window.fbAsyncInit;window.fbAsyncInit=function(){if(typeof FB==='undefined'){return} 28FB.Event.subscribe('xfbml.render',function(){$wrapper.removeClass(classes.loading);$wrapper.addClass(classes.loaded);var $counter=$wrapper.find(selectors.counter);var url=$counter.find('.fb_comments_count').attr('data-bimber-graph-api-url');FB.api('/'+url,'GET',{'fields':'engagement'},function(response){if(response.engagement){var count=response.engagement.comment_plugin_count;$('.fb_comments_count').html(count)}});var realCount=parseInt($counter.find('.fb_comments_count').text(),10);var postCount=parseInt($counter.attr('data-bimber-fb-comment-count'),10);if(realCount!==postCount){save(realCount)}});
28FB.Event.subscribe('comment.create',function(){changeCommentsNumber(1)});FB.Event.subscribe('comment.remove',function(){changeCommentsNumber(-1)});if(typeof origFbAsyncInit==='function'){origFbAsyncInit()}};$wrapper.on('loadComments',function(){if(loaded){return} 29$wrapper.addClass(classes.loading);loadComments(function(html){g1.resetFacebookSDK();$wrapper.find(selectors.list).html(html);$wrapper.removeClass(classes.loading)})})};var changeCommentsNumber=function(diff){var $counter=$wrapper.find(selectors.counter);var postCount=parseInt($counter.attr('data-bimber-fb-comment-count'),10);postCount+=diff;$wrapper.find('.fb_comments_count').text(postCount);$counter.attr('data-bimber-fb-comment-count',postCount);var $postCommentCount=$wrapper.parents('#content').find('.entry-comments-link strong');var postCommentCount=parseInt($postCommentCount.text(),10);$postCommentCount.text(postCommentCount+diff);var $fbCount=$(selectors.tab).find('a > span');if($fbCount.length>0){var fbCount=parseInt($fbCount.text(),10);$fbCount.text(fbCount+diff)} 30save(postCount)};var save=function(newCount){var postId=$wrapper.find(selectors.counter).attr('data-bimber-post-id');var nonce=$wrapper.find(selectors.counter).attr('data-bimber-nonce');$.ajax({'type':'POST','url':g1.config.ajax_url,'dataType':'json','data':{'action':'bimber_update_fb_comment_count','post_id':postId,'security':nonce,'count':newCount}})};var loadComments=function(callback){var postId=$wrapper.find(selectors.counter).attr('data-bimber-post-id');var xhr=$.ajax({'type':'GET','url':g1.config.ajax_url,'data':{'action':'bimber_load_fbcommentbox','post_id':postId}});xhr.done(function(res){callback(res);loaded=!0})}})(jQuery);(function($){'use strict';var selectors={'wrapper':'.g1-comment-type-dsq','counter':'.g1-comment-count','list':'.g1-comment-list','tab':'.g1-comments .g1-tab-item-dsq'};var classes={'loading':'g1-loading'};var $wrapper;var loaded=!1;g1.disqusComments=function(){$wrapper=$(selectors.wrapper);if($wrapper.length>0){init();return $wrapper}else{return!1}};var init=function(){var origDsqConfig=window.disqus_config;window.disqus_config=function(){if(typeof origDsqConfig==='function'){origDsqConfig();$wrapper.removeClass(classes.loading);loaded=!0} 31var $counter=$wrapper.find(selectors.counter);var realCount=parseInt($counter.find('.disqus-comment-count').text(),10);var postCount=parseInt($counter.attr('data-bimber-dsq-comment-count'),10);if(realCount!==postCount){save(realCount)} 32this.callbacks.onNewComment=[function(){changeCommentsNumber(1)}]};$wrapper.on('loadComments',function(){if(loaded){return}
33$wrapper.addClass(classes.loading);loadComments()})};var changeCommentsNumber=function(diff){var $counter=$wrapper.find(selectors.counter);var postCount=parseInt($counter.attr('data-bimber-dsq-comment-count'),10);postCount+=diff;$wrapper.find('.disqus-comment-count').text(postCount);$counter.attr('data-bimber-dsq-comment-count',postCount);var $postCommentCount=$wrapper.parents('#content').find('.entry-comments-link strong');var postCommentCount=parseInt($postCommentCount.text(),10);$postCommentCount.text(postCommentCount+diff);var $dsqCount=$(selectors.tab).find('a > span');if($dsqCount.length>0){var dsqCount=parseInt($dsqCount.text(),10);$dsqCount.text(dsqCount+diff)} 34save(postCount)};var save=function(newCount){var postId=$wrapper.find(selectors.counter).attr('data-bimber-post-id');var nonce=$wrapper.find(selectors.counter).attr('data-bimber-nonce');$.ajax({'type':'POST','url':g1.config.ajax_url,'dataType':'json','data':{'action':'bimber_dsq_update_comment_count','post_id':postId,'security':nonce,'count':newCount}})};var loadComments=function(){var dsq=document.createElement('script');dsq.type='text/javascript';dsq.async=!0;dsq.src='https://'+disqus_shortname+'.disqus.com/embed.js';(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(dsq)}})(jQuery);(function($){'use strict';$(document).ready(function(){g1.customShareButtons();g1.customizeShareButtons();if(g1.config.sharebar==='on'){g1.shareBar()} 35g1.comments();g1.loadNextPost()})})(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.