Cleaning blurblog url on profiles.

This commit is contained in:
Samuel Clay 2012-07-29 11:21:40 -07:00
parent 90f746d1ff
commit ec08d68414
2 changed files with 7 additions and 2 deletions

View file

@ -20,7 +20,12 @@ NEWSBLUR.Models.User = Backbone.Model.extend({
},
blurblog_url: function() {
return 'http://' + Inflector.sluggify(this.get('username')) + window.location.host.replace('www.', '');
return [
'http://',
Inflector.sluggify(this.get('username')),
'.',
window.location.host.replace('www.', '')
].join('');
}
});

View file

@ -54,7 +54,7 @@ NEWSBLUR.Views.SocialProfileBadge = Backbone.View.extend({
'shared ',
Inflector.pluralize('story', profile.get('shared_stories_count')),
' · ',
$.make('a', { href: profile.blurblog_url(), target: "_blank", className: "NB-profile-badge-blurblog-link NB-splash-link" }, profile.blurblog_url())
$.make('a', { href: profile.blurblog_url(), target: "_blank", className: "NB-profile-badge-blurblog-link NB-splash-link" }, profile.blurblog_url().replace('http://', ''))
]))
])
])