MU Soapbox

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

    Blocking retards and shitheads

    Mildly Constructive
    4
    4
    1038
    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.
    • Bug In A Jar
      Bug In A Jar Banned last edited by

      So after @Rick-Sanchez got banned, I decided to take it upon myself to write some JavaScript to make it so that you can ignore people's posts. I wrote a TamperMonkey script, which is a Google Chrome extension that lets you tamper with web pages you visit after the fact. Once there, you can just plop some JavaScript in there and it'll plop that ontop of your page. Pretty neat.

      I call this code NodeBB STFU. It works on all MU Soapbox URLs, but if you change the @match line, you can make it match other sites, too.

      Here's the code:

      // ==UserScript==
      // @name         NodeBB STFU
      // @namespace    http://nodebb.stfu/
      // @version      0.1
      // @description  Make people shut the fuck up on NodeBB by ignoring them
      // @author       Bug In A Jar
      // @match        http://musoapbox.net/*
      // @grant        none
      // @require      https://code.jquery.com/jquery-2.2.3.min.js
      // ==/UserScript==
      jQuery.noConflict();
      
      shit_list = ["silentsophia", "vorpal"];
      
      for (i = 0; i< shit_list.length; i++)
      {
        shit_list[i] = shit_list[i].toLowerCase();
      }
      
      show_hidden = true;
      
      function stfu()
      {
        jQuery.each(jQuery("li[component=post]"), function (k, v) {
          username = jQuery(v).attr("data-username");
      
          if (shit_list.indexOf(username.toLowerCase()) != -1)
          {
            console.log("Found post by shitlisted user: " + username);
            if (show_hidden) {
              jQuery(v).addClass("deleted");
              jQuery(v).find(".content").html("Shitpost detected.");
            } else {
              jQuery(v).remove();
            }
          }
        });
      }
      
      $(window).on('action:ajaxify.end', stfu);
      

      There are two parts of this code that you'll need to modify in order to get this to work:

      • the shit_list variable to include whoever you want to shut the fuck up. This is a standard JavaScript array, but it is not case sensitive
      • the show_hidden variable lets you choose either true or false. If you choose false, then it just deletes the post completely, but if you choose true, it shows that the person is blocked, but doesn't show their post. It looks something like this:
        0_1462999268452_Screenshot from 2016-05-11 16-38-16.png

      So, there you have it. You can now block posts on NodeBB, which is what MUSoapbox runs off of.

      1 Reply Last reply Reply Quote 6
      • HorrorHound
        HorrorHound last edited by

        @Bug-In-A-Jar
        You are the hero we need, but not the hero we deserve.

        The Center Cannot Hold.

        1 Reply Last reply Reply Quote 0
        • D
          Deleted last edited by

          I'm setting it up now and Bug in a Jar is the first person I intend to block.

          I don't even care.

          D 1 Reply Last reply Reply Quote 5
          • D
            Duntada @Deleted last edited by

            @Admiral

            We understand, it simply must be done.

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