diff --git a/public/src/forum/account.js b/public/src/forum/account.js index 0e8129bae9..8a99dc72e0 100644 --- a/public/src/forum/account.js +++ b/public/src/forum/account.js @@ -1,40 +1,40 @@ (function() { var yourid = templates.get('yourid'), theirid = templates.get('theirid'), - isFollowing = templates.get('isFollowing'); + isFollowing = templates.get('isFollowing'); - $(document).ready(function() { + $(document).ready(function() { - var rep = $('#reputation'); - rep.html(app.addCommas(rep.html())); - - var postcount = $('#postcount'); - postcount.html(app.addCommas(postcount.html())); - - var editLink = $('#editLink'); + var rep = $('#reputation'); + rep.html(app.addCommas(rep.html())); + + var postcount = $('#postcount'); + postcount.html(app.addCommas(postcount.html())); + + var editLink = $('#editLink'); var followBtn = $('#follow-btn'); - - if( yourid !== theirid) { - editLink.hide(); - if(isFollowing) - followBtn.hide(); - else - followBtn.show(); - } - else { - followBtn.hide(); - } - - followBtn.on('click', function() { - $.post('/users/follow', {uid: theirid}, - function(data) { - followBtn.remove(); - $('#user-action-alert').html('You are now following'+ $('.account-username').text() +'!').show(); - } + + if( yourid !== theirid) { + editLink.hide(); + if(isFollowing) + followBtn.hide(); + else + followBtn.show(); + } + else { + followBtn.hide(); + } + + followBtn.on('click', function() { + $.post('/users/follow', {uid: theirid}, + function(data) { + followBtn.remove(); + $('#user-action-alert').html('You are now following'+ $('.account-username').text() +'!').show(); + } ); - return false; - }); + return false; + }); - }); + }); }()); \ No newline at end of file