Skip to content

Node.js based forum software built for the modern web

duh

Barış Soner Uşaklı7bc2eeff4a6b
diff --git a/public/src/client/account/header.js b/public/src/client/account/header.js
index 92cc40a416..5db1d86723 100644
--- a/public/src/client/account/header.js
+++ b/public/src/client/account/header.js
@@ -5,22 +5,20 @@ define('forum/account/header', function() {
var AccountHeader = {};
AccountHeader.init = function() {
- displayAccountMenus();
+ hidePrivateLinks();
selectActivePill();
};
- function displayAccountMenus() {
+ function hidePrivateLinks() {
if (!app.user.uid || app.user.uid !== parseInt(ajaxify.variables.get('theirid'), 10)) {
- $('.account-sub-links .plugin-link.private').each(function() {
- $(this).addClass('hide');
- });
+ $('.account-sub-links .plugin-link.private').addClass('hide');
}
}
function selectActivePill() {
$('.account-sub-links li').removeClass('active').each(function() {
var href = $(this).find('a').attr('href');
-
+
if (href === window.location.pathname) {
$(this).addClass('active');
return false;