Permanently Deleted

  • YearOfTheCommieDesktop [they/them]
    ·
    edit-2
    1 year ago

    I made a userscript (like a browser extension but less work) to show only content from other instances ("dunk mode"), but it can just as easily be inverted! If you want to give it a try, just install something like TamperMonkey in your browser and then copy/paste and save this script:

    // ==UserScript==
    // @name         Lib Blocker
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  Block federated users on hexbear.net
    // @author       YearOfTheCommieDesktop
    // @match        https://hexbear.net/*
    // @icon         https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
    // @require      https://cdn.jsdelivr.net/gh/CoeJoder/waitForKeyElements.js@v1.2/waitForKeyElements.js
    // @grant        none
    // ==/UserScript==
    
    function processComment(comment) {
        var link = comment.querySelectorAll('a[title="link"]');
        if (link.length >= 2 && (!link[1].href.includes("hexbear.net") && !link[1].href.includes("lemmygrad.ml"))) {
            comment.querySelector('button[aria-label="Collapse"]').click();
        }
        return true;
    }
    
    waitForKeyElements('.comment-node', processComment);
    

    This will auto collapse all comments not from hexbear.net or lemmygrad. I could make it hide posts too, but browsing by Local I never see lib posts anyhow, so I didn't bother.