Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grahamperrin

macrumors 601
Original poster
Jun 8, 2007
4,942
648
To @ShinyDren @redheeler and/or to anyone with knowledge of stylesheet adaptations …

In at least two views –
  1. topic/discussion/thread
  2. search results
– I prefer to never see avatars.

Please, can either of both of those views be realised with a user stylesheet?
 

redheeler

macrumors G3
Oct 17, 2014
8,423
8,845
Colorado, USA
Let me see if I can throw something together for you...

Edit: Here is the finished code.
Code:
/*hide avatars*/
.avatar img, .avatar .img, .avatarCropper{
    display: none !important;
}
/*remove avatar space on thread lists*/
.listBlock.posterAvatar, .discussionList .sectionHeaders dt.posterAvatar{
    display: none !important;
}
.discussionListItem .lastPostInfo dd, .discussionListItem .lastPostInfo dt{
    margin-right: 0 !important;
}
.discussionListItem .lastPost, .discussionList .sectionHeaders dd.lastPost{
    width: 152px !important;
}
/*remove avatar space on search results*/
.search_results .sectionMain .searchResult{
    padding: 0 10px 0 0;
}
.search_results .searchResult .main{
    border-left: none !important;
}
/*remove avatar space elsewhere*/
.navPopup .listItemText, .xenOverlay.memberCard .userInfo, .previewTooltip .text, .searchResult .main, .event .content, .messageSimple .messageInfo, .memberListItem .member, .alerts .alertText, .lightBox .userText{
    margin-left: 0 !important;
}
span.avatar, .sidebar .visitorPanel .avatar{
    display: none !important;
}
/*display following and followers on profiles as usernames*/
.avatarHeap .avatar .img{
    display: table-cell !important;
    background-color: transparent !important;
    background-image: none !important;
    text-indent: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
/*fix position of the profile page link in the user menu*/
#AccountMenu .menuHeader .links .fl{
    left: 180px !important;
}
/*override for setting an avatar in the user cp*/
.avatarEditor .avatar .img, .AvatarEditor .avatar img, .AvatarEditor .avatarCropper{
    display: block !important;
}
 
Last edited:
  • Like
Reactions: grahamperrin

ShinyDren

macrumors member
Jun 25, 2010
67
23
Ambitoysterous, USA
redheeler's method is better (it fixes the now empty extra spacing) than the quick and dirty version I had.

My method was just:
Code:
a.avatar {
    display: none !important; /* do not display avatars */
}
Which just hides them anywhere they are displayed as a link, which is almost everywhere.
 
  • Like
Reactions: grahamperrin

redheeler

macrumors G3
Oct 17, 2014
8,423
8,845
Colorado, USA
redheeler's method is better (it fixes the now empty extra spacing) than the quick and dirty version I had.

My method was just:
Code:
a.avatar {
    display: none !important; /* do not display avatars */
}
Which just hides them anywhere they are displayed as a link, which is almost everywhere.
I thought about simply posting a modified version of my circular avatar fix, but saw a lot of gaps that needed to be closed up.

I probably won't be browsing the forums with avatars hidden (avatars help make users more recognizable and add more color to the forum), but I'm glad I could leave this fix here for anyone who wants to :)
 
Last edited:
  • Like
Reactions: grahamperrin

grahamperrin

macrumors 601
Original poster
Jun 8, 2007
4,942
648
Before …

… Maybe there could be an option to hide avatars?

I'm using Adblock to hide avatars. They're just too big and have far too much white space around them.

2015-06-11 01-51-55 screenshot.png
 

grahamperrin

macrumors 601
Original poster
Jun 8, 2007
4,942
648
After …

2015-06-11 01-52-22 screenshot.png
2015-06-11 01-35-38 screenshot.png

– that's so much better.

A major step towards encouraging more natural focus on content; less focus on the authors.

Thanks everyone!
 
Last edited:

redheeler

macrumors G3
Oct 17, 2014
8,423
8,845
Colorado, USA
Here is a companion userscript to fix an issue with no members displaying in some areas, such as "Birthdays" and "People You Follow". It will display them as usernames separated by commas. Unfortunately this issue can't be fixed with CSS unless those areas are made an exception to the avatar-hiding rule.
Code:
// ==UserScript==
// @name         Hide All Avatars Companion Userscript
// @version      0.2
// @author       redheeler
// @match        https://forums.macrumors.com/*
// @grant        none
// ==/UserScript==

function avatarsToUserNames(){
    var profileLinks = document.getElementsByClassName('_plainImage');
    if(typeof profileLinks[0] == 'undefined'){return;}
    for(var i=0; i<profileLinks.length; i++){
        var profileLink = profileLinks[i];
        var listItem = profileLink.parentNode;
        var avatar = profileLink.getElementsByTagName('img')[0];
        profileLink.innerHTML = avatar.alt;
        if(typeof listItem.parentNode.getElementsByTagName('li')[i+1] !== 'undefined'){
            var comma = document.createElement('span');
            comma.innerHTML = ',';
            listItem.innerHTML = '';
            listItem.appendChild(profileLink);
            listItem.appendChild(comma);
        }
    }
}

avatarsToUserNames();
 
Last edited:
  • Like
Reactions: grahamperrin
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.