this post was submitted on 11 Aug 2023
69 points (100.0% liked)

chapotraphouse

13473 readers
1 users here now

Banned? DM Wmill to appeal.

No anti-nautilism posts. See: Eco-fascism Primer

Vaush posts go in the_dunk_tank

Dunk posts in general go in the_dunk_tank, not here

Don't post low-hanging fruit here after it gets removed from the_dunk_tank

founded 4 years ago
MODERATORS
 

I WANT TO BE MORE ANGERY

top 14 comments
sorted by: hot top controversial new old
[–] YearOfTheCommieDesktop@hexbear.net 15 points 2 years ago* (last edited 2 years ago) (4 children)

Look no further, I have written a TamperMonkey script for exactly this purpose:

// ==UserScript==
// @name         Hexbear Blocker
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Hide comments from 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 !== 0 && link[1].href.includes("hexbear.net")) {
        comment.querySelector('button[aria-label="Collapse"]').click();
        console.log('hid hexer');
    }
    return true;
}



waitForKeyElements('.comment-node', processComment);

I didn't add any exemption for your own comments (yet) though so your own replies will be auto-collapsed too

And with tampermonkey it's easy to toggle on and off, just toggle the script and refresh

[–] YearOfTheCommieDesktop@hexbear.net 10 points 2 years ago* (last edited 2 years ago) (1 children)
[–] Parsani@hexbear.net 12 points 2 years ago

LibVision(tm)

[–] romaselli@lemmygrad.ml 6 points 2 years ago (1 children)

You probably also want to add a Lemmygrad exemption

Donezo - and now instead of collapsing comment trees it just removes the content.

// ==UserScript==
// @name         Hexbear Blocker
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Hide tankies 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();
        var content = comment.querySelector('div[class="md-div"]');
        if (content !== null) {
            content.remove();
        }
        //console.log('hid hexer');
    }
    return true;
}

waitForKeyElements('.comment-node', processComment);
[–] spectre@hexbear.net 2 points 2 years ago (1 children)

I think you need to close out the code block

[–] YearOfTheCommieDesktop@hexbear.net 2 points 2 years ago* (last edited 2 years ago) (1 children)

Nope. it's working as written. I close the function on line 20, the bottom call is not encased in a function,

[–] spectre@hexbear.net 3 points 2 years ago (1 children)

I just meant the triple backtick for formatting purposes

[–] YearOfTheCommieDesktop@hexbear.net 2 points 2 years ago (1 children)
[–] YearOfTheCommieDesktop@hexbear.net 2 points 2 years ago (1 children)
[–] spectre@hexbear.net 3 points 2 years ago

Whatever you ended up doing (or not), the formatting looks good now

[–] makotech222@hexbear.net 12 points 2 years ago
[–] outdated_belated@lemmy.sdf.org 8 points 2 years ago

This may come in handy 🏀