mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-17 21:12:50 +01:00
duh
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user