1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10(function( $ ) { 11 'use strict'; 12 13 $(document).ready(function() { 14 15 /* 16 * click handler 17 */ 18 $('.social-rocket-button, .social-rocket-floating-button, .social-rocket-tweet').on('click',function(e){ 19 20 if ( $( this ).hasClass( 'social-rocket-no-pop' ) ) { 21 $( this ).find( 'a' ).removeAttr( 'target' ); 22 return; 23 } 24 25 e.preventDefault(); 26 27 var href = $( this ).find('a').attr( 'href' ); 28 var network = $(this).data('network'); 29 var height = 500; 30 var width = 500; 31 32 if ( network === 'pinterest' ) { 33 var hasMedia = href.indexOf('&media=') > 0 ? true : false; 34 if ( ! hasMedia ) { 35 var el = document.createElement('script'); 36 el.setAttribute('type','text/javascript'); 37 el.setAttribute('charset','UTF-8'); 38 el.setAttribute('src','https://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999); 39 document.body.appendChild(el); 40 return false; 41 } 42 height = 900; 43 width = 800; 44 } 45 46 var top = window.screenY + (window.innerHeight - height) / 2; 47 var left = window.screenX + (window.innerWidth - width) / 2; 48 var windowFeatures = 'height=' + height + ',width=' + width + ',top=' + top + ',left=' + left; 49 var instance = window.open( href, '_blank', windowFeatures ); 50 51 return false; 52 }); 53 54 55 /* 56 * hover handler 57 */ 58 /* 59 $('.social-rocket-button').on('mouseenter',function(){ 60 // reserved for future use 61 }); 62 63 $('.social-rocket-button').on('mouseleave',function(){ 64 // reserved for future use 65 }); 66 */ 67 68 69 /* 70 * More button 71 */ 72 $( document ).on( 'click', '.social-rocket-more-button', function( e ) { 73 74 e.preventDefault(); 75 76 var $parent; 77 var $toggle = $( this ); 78 var $target = $toggle.next('.social-rocket-more-buttons'); 79 80 var togglePosition = $toggle.position(); 81 82 var isFloating = $toggle.closest( '.social-rocket-floating-buttons' ).length ? true : false; 83 var isInline = $toggle.closest( '.social-rocket-buttons' ).length ? true : false; 84 85 var left = 0; 86 var top = 0; 87 88 if ( isFloating ) { 89 $parent = $toggle.closest( '.social-rocket-floating-buttons' ); 90 $target.css({ 91 'width': ( $toggle.width() + 30 ) + 'px' 92 }); 93 } 94 95 if ( isInline ) { 96 $parent = $toggle.closest( '.social-rocket-buttons' ); 97 } 98 99 if ( $target.hasClass('bottom') ) { 100 left = togglePosition.left - $target.width() / 2; 101 top = togglePosition.top + $toggle.height() + 9; 102 } else { 103 left = togglePosition.left; 104 top = togglePosition.top - $target.height() - 30; 105 } 106 107 if ( $parent.hasClass( 'social-rocket-position-left' ) ) { 108 left = left + $toggle.width() + 5; 109 } else if ( $parent.hasClass( 'social-rocket-position-right' ) ) { 110 left = left - $toggle.width() - 35; 111 } else if ( $parent.hasClass( 'social-rocket-position-top' ) ) { 112 top = $toggle.height() + 5; 113 } 114 115 $target.css({ 116 'left': left + 'px', 117 'top': top + 'px' 118 }); 119 120 $target.toggle(); 121 e.stopPropagation(); 122 123 }); 124 125 $( document ).on( 'click', function (e) { 126 $( '.social-rocket-more-buttons' ).hide(); 127 }); 128 129 $( '.social-rocket-more-buttons' ).click(function ( e ) { 130 e.stopPropagation(); 131 }); 132 133 134 /* 135 * vertically center left/right floating buttons 136 */ 137 var $floatingButtonsToCenter = $('#social-rocket-floating-buttons.social-rocket-vertical-position-center'); 138 139 $floatingButtonsToCenter.css('top', ( window.innerHeight - $('#social-rocket-floating-buttons').height() ) / 2 ); 140 141 $(window).on( 'resize', function() { 142 $floatingButtonsToCenter.css('top', ( window.innerHeight - $('#social-rocket-floating-buttons').height() ) / 2 ); 143 }); 144 145 /*
146 * position top floating buttons if WP admin bar present 147 */ 148 var $floatingButtonsToPosition = $('.admin-bar .social-rocket-floating-buttons.social-rocket-position-top'); 149 var floatingButtonsPositionFix = function() { 150 if ( $('#wpadminbar').css('position') === 'fixed' ) { 151 $floatingButtonsToPosition.css('top',''); 152 return; 153 } 154 var adminBarHeight = $('#wpadminbar').height(); 155 var scrollPosition = $(window).scrollTop(); 156 var buttonsOffset = $floatingButtonsToPosition.offset().top; 157 $floatingButtonsToPosition.css('top',( adminBarHeight - scrollPosition > 0 ? adminBarHeight - scrollPosition : 0 )+'px'); 158 } 159 if ( $floatingButtonsToPosition.length ) { 160 $(window).on( 'scroll', function() { 161 floatingButtonsPositionFix(); 162 }); 163 floatingButtonsPositionFix(); 164 } 165 166 /* 167 * add padding for top/bottom floating buttons 168 */ 169 var $topFloatingButtons = $('.social-rocket-floating-buttons.social-rocket-position-top'); 170 var $bottomFloatingButtons = $('.social-rocket-floating-buttons.social-rocket-position-bottom'); 171 var floatButtonsPaddingFix = function() { 172 var buttonBarHeight; 173 if ( $topFloatingButtons.length ) { 174 buttonBarHeight = $topFloatingButtons.is(':visible') ? $topFloatingButtons.height() : 0; 175 $('body').css('padding-top',buttonBarHeight+'px'); 176 } 177 if ( $bottomFloatingButtons.length ) { 178 buttonBarHeight = $bottomFloatingButtons.is(':visible') ? $bottomFloatingButtons.height() : 0; 179 $('body').css('padding-bottom',buttonBarHeight+'px'); 180 } 181 } 182 if ( $topFloatingButtons.length || $bottomFloatingButtons.length ) { 183 $(window).on( 'resize', function() { 184 floatButtonsPaddingFix(); 185 }); 186 floatButtonsPaddingFix(); 187 } 188 189 }); 190 191})( jQuery ); 192 193}
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.