WordPress.org

Making WordPress.org

Changeset 1073


Ignore:
Timestamp:
12/25/2014 07:09:16 AM (6 years ago)
Author:
nacin
Message:

Trac: Link username in header. fixes #503.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/style/trac/wp-trac.js

    r1071 r1073  
    106106                }
    107107
     108                // Link username in header
     109                (function($) {
     110                    var el = $('#metanav').find('.first'),
     111                        username;
     112                    username = el.text();
     113                    if ( 0 === username.indexOf( 'logged in as' ) ) {
     114                        username = username.replace( 'logged in as ', '' );
     115                        el.html( $('<a />', { href: 'https://profiles.wordpress.org/' + username }).text( username ) ).prepend( 'logged in as ');
     116                    }
     117                })(jQuery);
     118
    108119                // A collection of ticket hacks that must be run again after previews.
    109120                wpTrac.postPreviewHacks();
Note: See TracChangeset for help on using the changeset viewer.