MU Soapbox

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Muxify
    • Mustard

    Userscript for Ignoring Users and/or Threads

    Suggestions & Questions
    ignore msb userscript forum
    4
    12
    4255
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Ninjakitten
      Ninjakitten last edited by Ninjakitten

      I figured I'd pop this somewhere slightly less buried, in case anyone finds it useful. It's a browser userscript; it works on Firefox with Greasemonkey and ought to be fine on Chrome with Tampermonkey. Basically, if you want to ignore a user, put that username in the name array. If you want to ignore a thread, put that title in the thread array. Be exact. You can also decide whether or not to ignore threads which someone you're ignoring started.

      // ==UserScript==
      // @name        Go Away
      // @namespace   MSB
      // @include     http://musoapbox.net/*
      // @version     2.0
      // @run-at      document-end
      // @grant       none
      // ==/UserScript==
      
      'use strict';
      
      (function ($) {
      
          // Users you want to ignore
          var users = ["Name1","Name2","NameN"];
      
          // Threads you want to ignore
          var threads = ["Thread1","Thread2","ThreadN"];
      
          // Ignore threads started by ignored users? (true or false)
          var hideStartedBy = true;
      
          function cleanUsers() { 
            $.each(users,function(index,value) {
                $('li[data-username="'+value+'"]').css('display','none');
                $('img[data-original-title="'+value+'"]').closest('.card').css('display','none');
            });
          }
          function cleanThreads() {
              $.each(threads,function(index,value) {
                  $('meta[content="'+value+'"]').parent('li.row').css('display','none');
              });
              if (hideStartedBy) {
                  $.each(users,function(index,value) {
                      $('.pull-left div[data-original-title="'+value+'"]').closest('li[component="category/topic"]').css('display','none');
                  });
              }
          }
      
          cleanUsers();
          cleanThreads();
      
          $(window).on('action:ajaxify.end', function(data) {
              cleanUsers();
              cleanThreads();
          });    
          $(window).on('action:posts.loaded', function(data) {
              cleanUsers();
          });
          $(window).on('action:topics.loaded', function(data) {
              cleanUsers();
              cleanThreads();
          });
      })(jQuery)
      

      It's not fancy (or intensely tested), you'll get the little red notification even for threads you're ignoring (just mark all read to get rid of it), and it won't do anything about chats... but it handles the very basics. It's possible I'll get inspired to fancy it up later, but anyone else can feel free to do so themselves in the meantime.

      (If you use it and a forum update breaks it, please let me know, since you may notice before I do.)

      Arkandel 1 Reply Last reply Reply Quote 1
      • Arkandel
        Arkandel Admin @Ninjakitten last edited by

        @Ninjakitten I'd thank you but you're ignoring me so you won't see it. 😞

        • He who takes offense when not intended is a fool. He who takes offense when intended is a greater fool.
        Wolfs 1 Reply Last reply Reply Quote 2
        • Wolfs
          Wolfs @Arkandel last edited by Wolfs

          @Arkandel I didn't see this because I'm already ignoring @Ninjakitten

          Somewhat related, it's nice to have a good, working blocking script for a different site that, while generally good, is plagued by a problem of a few trolls who constantly create new accounts to screw with the message board. This is especially good when the person running the place is too busy dealing with other stuff and too slow to actually fix whatever IP banning function there used to be, so when one account is suspended these people just go over to a new one with a new e-mail address.

          (Note, I'm not REALLY ignoring @Ninjakitten. I don't even know @Ninjakitten in any way.)

          Ninjakitten 1 Reply Last reply Reply Quote 0
          • Ninjakitten
            Ninjakitten @Wolfs last edited by

            @Wolfs
            I'm very stealthy.

            (Also, pleased if it can help. 🙂 )

            Wolfs 1 Reply Last reply Reply Quote 0
            • Wolfs
              Wolfs @Ninjakitten last edited by

              @Ninjakitten Ninja + cat = stealth, yep.

              And you should see the version of the script I have on that other site. It has literally dozens of names in it. There's also some custom color stuff coded in with it because for whatever reason, a basic Stylish script someone had written for me stopped working after a site upgrade.

              I have eyes that are pretty light-sensitive, so I try to go with darker versions of websites whenever I can.

              Arkandel 1 Reply Last reply Reply Quote 0
              • Arkandel
                Arkandel Admin @Wolfs last edited by

                @Wolfs I don't really care enough to block anyone. The worst people around here also happen to be the ones I get most of my work-day lols from, blocking their posts would be terribly counter-productive (or plain productive as my boss would probably call it).

                • He who takes offense when not intended is a fool. He who takes offense when intended is a greater fool.
                Wolfs 1 Reply Last reply Reply Quote 0
                • Wolfs
                  Wolfs @Arkandel last edited by

                  @Arkandel I dunno if I'll actually have enough of a reason to block someone here, at least not now. I was more just trying to make a joke.

                  Arkandel 1 Reply Last reply Reply Quote 0
                  • Arkandel
                    Arkandel Admin @Wolfs last edited by

                    @Wolfs Cirno came close, but mostly because some of his inline images were borderline NSFW.

                    (And as @Glitch pointed out actually clicking on linked ones was reserved for the truly reckless)

                    • He who takes offense when not intended is a fool. He who takes offense when intended is a greater fool.
                    Wolfs Thenomain 2 Replies Last reply Reply Quote 1
                    • Wolfs
                      Wolfs @Arkandel last edited by

                      @Arkandel I would have blocked Cirno, absolutely.

                      1 Reply Last reply Reply Quote -1
                      • Thenomain
                        Thenomain @Arkandel last edited by

                        @Arkandel

                        I did delete some pictures, while I probably should have simply turned them into links, but I don't regret it and would do it again.

                        “If you wish to make an apple pie from scratch, you must first invent the universe.”
                        ― Carl Sagan, Cosmos

                        1 Reply Last reply Reply Quote 0
                        • Ninjakitten
                          Ninjakitten last edited by

                          Just a reminder that this script still exists. It's not perfect or as elegant as I'd prefer (but have not yet been bothered to try to make it) but for quick and dirty I-don't-want-to-see-that, it should still work all right. (If you try it and it doesn't, please let me know.)

                          1 Reply Last reply Reply Quote 0
                          • Ninjakitten
                            Ninjakitten last edited by

                            Realised one of the updates partially broke this -- it should work properly again now.

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post