GMC Forums Prettify GMC: Filtering out status posts with Tampermonkey

Discussion in 'Community Chat' started by Tsa05, Aug 14, 2018.

  1. Tsa05

    Tsa05 Member

    Jun 21, 2016
    Hi all,

    Every so often, I realize I have an intolerant side to me, and that makes me sad.... But there's no group therapy sub-forum, so what's a frustrated forum-goer to do when feeling irrationally annoyed by any particular user posting constant streams of nonsense in the Status feed or the New Posts feed?

    On a coding forum, there can be only one solution... Tampermonkey! Or, Greasemonkey.
    For those not in the know about these arbitrary words:
    Tamper/Greasemonkey are extensions/addons for Chrome/Firefox. In and of themselves, they do almost nothing--but they add a button to your browser bar that launches a dashboard where you can manage "user scripts." These are javascript snippets that you can write for yourself to modify the appearance or function of anything client-side on any web page you happen to visit. For example, you could write a javascript that locates all status posts by a certain person or persons and hides them.

    If you're already set up with the appropriate plugin, here's a quick, simple script to hide items from the New Posts and the Status feeds whenever you land on the forum home. Just add usernames to the list in the script below and paste it into your monkey; in seconds, you'll be wondering where all the nuts around here have gone!

    // ==UserScript==
    // @name         Hide Undesireables
    // @namespace
    // @version      0.1
    // @description  Hide status/newpost <LI>
    // @author       Tsa05
    // @match
    // @grant        none
    // ==/UserScript==
    (function() {
        'use strict';
        var list = ["username0", "username1"];
        var removalList = new Array;
        for(var i=0; i<list.length; i++){
            removalList.push($("li[data-author=\"" + list[i] + "\""));
        for(var ii=0; ii<removalList.length; ii++){
            var node = removalList[ii];
            node.each(function(index, item){
    Posh Indie likes this.
  2. Mercerenies

    Mercerenies Member

    Jun 21, 2016
    Nocturne likes this.
  3. YellowAfterlife

    YellowAfterlife ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ Forum Staff Moderator

    Apr 21, 2016
    That also hides the forum posts from the person, although one could argue that there isn't much lost for most of those that borderline abuse the profile update system.
  4. TsukaYuriko

    TsukaYuriko Q&A Spawn Camper Forum Staff Moderator

    Apr 21, 2016
    That's Nocturne's line. :p

    Looking forward to the confused PMs of members who use this, forget about it and later are met with an empty status update section.
    Tsa05 and Nocturne like this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice