1(function ($) { 2$(window).on('load',function(){ 3 var $article_content = $('.thecontent .article_body_content'); 4 var $article_blockshare = $('.thecontent .share-buttons'); 5 var $socialLink = site_config_js.change_fix_socialLink_selector ? $('.thecontent .share-buttons .social') : $('.thecontent .social'); 6 if($article_content.length>0 && $article_blockshare.length>0 && $socialLink.length>0){ 7 var article_height = $article_content.innerHeight(); 8 var blockshare_height = $article_blockshare.innerHeight(); 9 10 var menu_spacing = 47; 11 var scroll_pos; 12 var article_offset = $article_content.offset().top; 13 var socialLink_offset; 14 var mobile_max_width = 767; 15 var window_width = $(window).width(); 16 var $header = $('header.main-header'); 17 var $adminbar = $('#wpadminbar'); 18 19 if( $header.length>0 ) menu_spacing = $header.innerHeight() + 20; 20 if( $adminbar.length>0 ) menu_spacing += $adminbar.innerHeight(); 21 22 if(article_height > blockshare_height && window_width > mobile_max_width){ 23 $article_blockshare.css({ 24 'height' : article_height, 25 }); 26 } 27 28 $(document).scroll(function(){ 29 if(article_height > blockshare_height && window_width > mobile_max_width){ 30 scroll_pos = $(window).scrollTop(); 31 socialLink_offset = $socialLink.offset().top; 32 33 if(scroll_pos > (article_offset-menu_spacing)){ 34 if((blockshare_height+scroll_pos) > (article_height + (article_offset-menu_spacing))){ 35 $socialLink.css({ 36 'position' : 'absolute', 37 'top' : 'auto', 38 'bottom' : 0, 39 }); 40 }else{ 41 $socialLink.css({ 42 'position' : 'fixed', 43 'top' : menu_spacing+'px', 44 'bottom' : 'auto', 45 }); 46 } 47 }else{ 48 $socialLink.css({ 49 'position' : 'absolute', 50 'top' : 0, 51 'bottom' : 'auto', 52 }); 53 } 54 } 55 }); 56 } 57 58}); 59})(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.