Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

Resolved Hiding/suppressing/not showing avatars (variations from the MacRumors-provided stylesheet)

grahamperrin

macrumors 601
Original poster
Jun 8, 2007
4,942
643
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 604
Oct 17, 2014
7,663
7,511
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
Comment

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
Comment

redheeler

macrumors 604
Oct 17, 2014
7,663
7,511
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
Comment

grahamperrin

macrumors 601
Original poster
Jun 8, 2007
4,942
643
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
 
Comment

grahamperrin

macrumors 601
Original poster
Jun 8, 2007
4,942
643
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:
Comment

redheeler

macrumors 604
Oct 17, 2014
7,663
7,511
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
Comment
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.