Add a function for returning the best gravatar URL for the display.

Review Request #7573 — Created Aug. 7, 2015 and submitted — Latest diff uploaded

chipx86
Djblets
release-0.9.x
djblets

This splits out all the URL computation logic from $.fn.retinaGravatar()
into a new Djblets.getGravatarForDisplay(). This can be used in cases
where the HTML for a piece of UI is being generated and isn't yet part
of the DOM, and can be more efficient than post-processing existing
elements.

Tested that existing Gravatars were continuing to work.

Used this function in some code that was building HTML fragments. It
resulted in Retina-friendly Gravatars.

Loading...