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