File Editor
Directories:
.. (Back)
carousel
cloudflare-analytics
comment-likes
comments
custom-post-types
geo-location
google-fonts
gravatar
infinite-scroll
likes
markdown
memberships
photon-cdn
plugin-search
post-by-email
related-posts
scan
seo-tools
sharedaddy
shortcodes
simple-payments
site-icon
sitemaps
stats
subscriptions
theme-tools
tiled-gallery
verification-tools
videopress
widget-visibility
widgets
woocommerce-analytics
wordads
wpcom-tos
Files:
blaze.php
blocks.php
carousel.php
comment-likes.php
comments.php
contact-form.php
copy-post.php
custom-content-types.php
geo-location.php
google-fonts.php
gravatar-hovercards.php
infinite-scroll.php
json-api.php
latex.php
likes.php
markdown.php
masterbar.php
module-extras.php
module-headings.php
module-info.php
monitor.php
notes.php
photon-cdn.php
photon.php
plugin-search.php
post-by-email.php
post-list.php
protect.php
publicize.php
related-posts.php
search.php
seo-tools.php
sharedaddy.php
shortcodes.php
shortlinks.php
sitemaps.php
sso.php
stats.php
subscriptions.php
theme-tools.php
tiled-gallery.php
vaultpress.php
verification-tools.php
videopress.php
waf.php
widget-visibility.php
widgets.php
woocommerce-analytics.php
wordads.php
wpgroho.js
Create New File
Create
Edit File: wpgroho.js
/* global WPGroHo:true, Gravatar */ ( function () { var extend = function ( out ) { out = out || {}; for ( var i = 1; i < arguments.length; i++ ) { if ( ! arguments[ i ] ) { continue; } for ( var key in arguments[ i ] ) { if ( Object.hasOwn( arguments[ i ], key ) ) { out[ key ] = arguments[ i ][ key ]; } } } return out; }; WPGroHo = extend( { my_hash: '', data: {}, renderers: {}, syncProfileData: function ( hash, id ) { var hashElements; if ( ! WPGroHo.data[ hash ] ) { WPGroHo.data[ hash ] = {}; hashElements = document.querySelectorAll( 'div.grofile-hash-map-' + hash + ' span' ); for ( var i = 0; i < hashElements.length; i++ ) { WPGroHo.data[ hash ][ hashElements[ i ].className ] = hashElements[ i ].innerText; } } WPGroHo.appendProfileData( WPGroHo.data[ hash ], hash, id ); }, appendProfileData: function ( data, hash, id ) { for ( var key in data ) { if ( 'function' === typeof WPGroHo.renderers[ key ] ) { return WPGroHo.renderers[ key ]( data[ key ], hash, id, key ); } var card = document.getElementById( id ); if ( card ) { var heading = card.querySelector( 'h4' ); if ( heading ) { var extra = document.createElement( 'p' ); extra.className = 'grav-extra ' + key; extra.innerHTML = data[ key ]; heading.insertAdjacentElement( 'afterend', extra ); } } } }, }, WPGroHo || {} ); var jetpackHovercardsInit = function () { if ( 'undefined' === typeof Gravatar ) { return; } Gravatar.profile_cb = function ( h, d ) { WPGroHo.syncProfileData( h, d ); }; Gravatar.my_hash = WPGroHo.my_hash; Gravatar.init( 'body', '#wpadminbar' ); }; if ( document.readyState === 'interactive' || document.readyState === 'complete' ) { jetpackHovercardsInit(); } else { document.addEventListener( 'DOMContentLoaded', jetpackHovercardsInit ); } } )();
Save Changes
Rename File
Rename