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

Discussion in 'Site and Forum Feedback' started by grahamperrin, Jun 9, 2015.

  1. grahamperrin macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #1
    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?
     
  2. redheeler, Jun 9, 2015
    Last edited: Jun 10, 2015

    redheeler macrumors 603

    redheeler

    Joined:
    Oct 17, 2014
    #2
    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;
    }
     
  3. ShinyDren macrumors member

    ShinyDren

    Joined:
    Jun 25, 2010
    Location:
    Ambitoysterous, USA
    #3
    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.
     
  4. redheeler, Jun 10, 2015
    Last edited: Jun 10, 2015

    redheeler macrumors 603

    redheeler

    Joined:
    Oct 17, 2014
    #4
    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 :)
     
  5. C DM macrumors Westmere

    Joined:
    Oct 17, 2011
    #5
    Hopefully an actual option for this will be added to the forums.
     
  6. grahamperrin thread starter macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #6
    Before …

    2015-06-11 01-51-55 screenshot.png
     
  7. grahamperrin, Jun 10, 2015
    Last edited: Jun 10, 2015

    grahamperrin thread starter macrumors 601

    grahamperrin

    Joined:
    Jun 8, 2007
    #7
    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!
     
  8. redheeler macrumors 603

    redheeler

    Joined:
    Oct 17, 2014
    #8
    Updated my post above to fix a couple minor spacing issues that I missed. Happy to help @grahamperrin :)
     
  9. redheeler, Jul 17, 2015
    Last edited: Jul 17, 2015

    redheeler macrumors 603

    redheeler

    Joined:
    Oct 17, 2014
    #9
    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        http://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();
     

Share This Page