User Controls

Userscript to Block/Mute Users

  1. #1
    ner vegas African Astronaut
    got sick enough of wariat's retard/porno spam to write javascript. fuck you for making me do that.

    separate blocklists for threads and posts. if you want to hide both add the poster's name to both lists.

    if you want to use it, just install tampermonkey as a browser extension, save this to a file, update the BLOCKED_THREAD_MAKERS and BLOCKED_POSTERS to whatever you want and feed it to tampermonkey. there should be a little note in the footer reporting how many threads/posts are hidden on the current page.

    // ==UserScript==
    // @name niggasin.space (ISS) user mute
    // @namespace http://niggasin.space/
    // @version 1.0n
    // @description nigger
    // @author nervegas
    // @match *://niggasin.space/*
    // @icon https://niggasin.space/media/avatars/digiskg_0V0Kspx.png
    // @grant none
    // ==/UserScript==

    (


    function() {

    'use strict';
    const BLOCKED_THREAD_MAKERS = ['user1', 'user2', 'user3'];
    const BLOCKED_POSTERS = ['user4', 'user5', 'user6'];

    var currentUrl=window.location.href;
    if(currentUrl.includes('/latest-threads')||currentUrl.includes('/forum/')){
    hideThreads();
    }
    else if(currentUrl.includes('/thread/')){
    hidePosts()
    }

    function hidePosts(){
    var postAuthor=document.getElementsByClassName('author-name');
    var postsHidden=0;

    for(var x=0;x<postAuthor.length;x++){
    for(var y=0;y<BLOCKED_POSTERS.length;y++){
    if(postAuthor[x].textContent.includes(BLOCKED_POSTERS[y])){
    postAuthor[x].parentElement.parentElement.style.display='none';
    postsHidden++;
    }
    }
    };
    printDebug("🤐 Total posts hidden: "+postsHidden)

    }

    function hideThreads() {
    var threadAuthor=document.getElementsByClassName('thread-author');
    var threadsHidden=0;

    for(var x=0;x<threadAuthor.length;x++){
    for(var y=0;y<BLOCKED_THREAD_MAKERS.length;y++){
    if(threadAuthor[x].textContent.includes(BLOCKED_THREAD_MAKERS[y])){
    threadAuthor[x].parentElement.parentElement.style.display='none';
    threadsHidden++;
    }
    }
    };
    printDebug("🤐 Total threads hidden: "+threadsHidden)
    }

    function printDebug(debugOut) {
    var footerObject=document.getElementsByClassName('page-footer');
    footerObject[0].textContent+=(debugOut);
    }
    }
    )();
    The following users say it would be alright if the author of this post didn't die in a fire!
  2. #2
    infinityshock Black Hole
    I'd rather just duct tape him into the lithotomy position and toss him naked into an alleyway behind a gay biker bar.
  3. #3
    ner vegas African Astronaut
    Originally posted by ner vegas there should be a little note in the footer reporting how many threads/posts are hidden on the current page.



    if it's not there the script's not running properly and you should ask for a refund
  4. #4
    Charles Ex Machina African Astronaut
    lol, op lacks self control.

    this is just like alcoholics trying to lock their alcohols in a cuoboard to stop drinking.

    JUST SCROLL OVER LIKE EVERYONE ELSE
    The following users say it would be alright if the author of this post didn't die in a fire!
  5. #5
    ner vegas African Astronaut
    Originally posted by Charles Ex Machina lol, op lacks self control.

    this is just like alcoholics trying to lock their alcohols in a cuoboard to stop drinking.

    JUST SCROLL OVER LIKE EVERYONE ELSE

    I mostly just don't want to be jumpscared with grandpa cocks every time I open a thread

    was experimenting with just blocking embeds, might write a new module later
  6. #6
    Charles Ex Machina African Astronaut
    cant you just use ublock origin ?
  7. #7
    Packet Yung Blood
    He's going to spam your inbox now.
  8. #8
    ner vegas African Astronaut
    yeah but then I have to right-click block each embed individually
  9. #9
    Packet Yung Blood
    What ChatGPT came up with ~
    // ==UserScript==
    // @name Web Forum User Blocker
    // @namespace http://tampermonkey.net/
    // @version 0.1
    // @description Block posts and threads from certain users on a web forum.
    // @author Your Name
    // @match https://example.com/forum/*
    // @grant none
    // ==/UserScript==

    (function() {
    'use strict';

    // List of users to block
    var blockedUsers = [
    "user1",
    "user2",
    "user3"
    ];

    // Function to check if a post or thread should be blocked
    function shouldBlock(element) {
    var usernameElement = element.querySelector('.username'); // Change this selector to match the username element in your forum
    if (usernameElement) {
    var username = usernameElement.innerText.trim();
    return blockedUsers.includes(username);
    }
    return false;
    }

    // Function to hide blocked posts and threads
    function hideBlockedPosts() {
    var posts = document.querySelectorAll('.post, .thread'); // Change these selectors to match the post and thread elements in your forum
    posts.forEach(function(post) {
    if (shouldBlock(post)) {
    post.style.display = 'none';
    }
    });
    }

    // Run the function to hide blocked posts when the page loads
    document.addEventListener('DOMContentLoaded', hideBlockedPosts);

    // Run the function to hide blocked posts when new posts are loaded (if your forum uses AJAX)
    document.addEventListener('DOMNodeInserted', hideBlockedPosts);
    })();
  10. #10
    ner vegas African Astronaut
    Originally posted by Packet He's going to spam your inbox now.

    he already does then when he's banned
  11. #11
    Kingoffrogs African Astronaut
    It works. Thanks.
    The following users say it would be alright if the author of this post didn't die in a fire!
  12. #12
    ner vegas African Astronaut
    Originally posted by Packet What ChatGPT came up with ~

    I can sort of follow but I don't really know the best way to do it because I hate javascript and just learned a bit to avoid the jumpscares
  13. #13
    Charles Ex Machina African Astronaut
    Originally posted by ner vegas yeah but then I have to right-click block each embed individually

    i thought it has the function to block elements
  14. #14
    Help I blocked my own posts
  15. #15
    Help I blocked my own posts did I already post this
  16. #16
    Help my postsdidi already say this yet bump
  17. #17
    ner vegas African Astronaut
    lol just edit the script and remove your name from

    const BLOCKED_THREAD_MAKERS = [];
    const BLOCKED_POSTERS = [];
  18. #18
    Ghost Black Hole
    mote is me
  19. #19
    Instigator Space Nigga
    You cannot see this post because Instigator is on your block list.
  20. #20
    Ghost Black Hole
    blocking people is akin to calling the police
Jump to Top