1/* global WPGroHo:true, Gravatar */ 2WPGroHo = jQuery.extend( 3 { 4 my_hash: '', 5 data: {}, 6 renderers: {}, 7 syncProfileData: function( hash, id ) { 8 if ( ! WPGroHo.data[ hash ] ) { 9 WPGroHo.data[ hash ] = {}; 10 jQuery( 'div.grofile-hash-map-' + hash + ' span' ).each( function() { 11 WPGroHo.data[ hash ][ this.className ] = jQuery( this ).text(); 12 } ); 13 } 14 15 WPGroHo.appendProfileData( WPGroHo.data[ hash ], hash, id ); 16 }, 17 appendProfileData: function( data, hash, id ) { 18 for ( var key in data ) { 19 if ( jQuery.isFunction( WPGroHo.renderers[ key ] ) ) { 20 return WPGroHo.renderers[ key ]( data[ key ], hash, id, key ); 21 } 22 23 jQuery( '#' + id ) 24 .find( 'h4' ) 25 .after( jQuery( '<p class="grav-extra ' + key + '" />' ).html( data[ key ] ) ); 26 } 27 }, 28 }, 29 WPGroHo 30); 31 32jQuery( document ).ready( function() { 33 if ( 'undefined' === typeof Gravatar ) { 34 return; 35 } 36 37 Gravatar.profile_cb = function( h, d ) { 38 WPGroHo.syncProfileData( h, d ); 39 }; 40 41 Gravatar.my_hash = WPGroHo.my_hash; 42 Gravatar.init( 'body', '#wpadminbar' ); 43} );
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.