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

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

Information

Djblets
release-0.9.x

Reviewers

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.

Description From Last Updated

There's no reason to define a variable here now.

daviddavid
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.retina.js
        djblets/static/djblets/js/jquery.gravy.util.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        djblets/static/djblets/js/jquery.gravy.retina.js
        djblets/static/djblets/js/jquery.gravy.util.js
    
    
  2. 
      
david
  1. 
      
  2. djblets/static/djblets/js/jquery.gravy.retina.js (Diff revision 1)
     
     
     
     
    Show all issues

    There's no reason to define a variable here now.

    1. It's used in $el.attr('src').

  3. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.9.x (434b038)
Loading...