16
submitted 2 months ago* (last edited 2 months ago) by davel@hexbear.net to c/hexbear@hexbear.net

I’m probably going to the_dunk_tank for this, but…

Requirements: Violentmonkey browser extension. Tampermonkey and Greasemonkey might work as well, but I haven’t & won’t test them. Note also that I haven’t & won’t test Chrome or Edge, either.

// ==UserScript==
// @name        lemmy-delete-tagline
// @match       https://hexbear.net/
// @require https://cdn.jsdelivr.net/npm/@violentmonkey/dom@2
// ==/UserScript==
VM.observe(document.body, () => {
  const node = document.querySelector('#tagline');
  if (node) {
    node.remove();
    return true;
  }
});

Edit to add: Maybe it needs some work: when I click on the homepage icon from another page, it fails to remove the tagline. I’m an old who doesn’t understand how progressive web applications work. Maybe I need to remove the return true and also tune how often the observer observes. Or maybe there’s some trigger I should hook it up to. Simply removing return true does seem to work, but I have no idea if it’s at the cost of any appreciable performance.

Edit to add more: !companero@hexbear.net suggested that I just use a uBlock Origin filter. I tried it and it works. It’s as simple as:

hexbear.net###tagline
top 7 comments
sorted by: hot top controversial new old
[-] Aryuproudomenowdaddy@hexbear.net 15 points 2 months ago

THE WASHINGTON POST

How Hexbear taglines die in darkness

[-] davel@hexbear.net 7 points 2 months ago

💅

hexbear.net###comment-4816238
[-] companero@hexbear.net 9 points 2 months ago

Couldn't you just do this with uBlock's "block element" feature?

[-] davel@hexbear.net 8 points 2 months ago* (last edited 2 months ago)

Maybe? Funnily enough I have uBlock Origin installed, but monkeying around was the first thing that came to mind.

Edit to add: Damn: I just right-click the tagline and click “Block element…”. That was 8,000 times less effort. The filter is simply:

hexbear.net###tagline
[-] blakeus12@hexbear.net 7 points 2 months ago

can you set ublock to always block an element when you go on a site?

[-] companero@hexbear.net 5 points 2 months ago

I think it does so by default. Not 100% sure as I don't really use that feature much.

this post was submitted on 16 Apr 2024
16 points (100.0% liked)

hexbear

10143 readers
2 users here now

Now that the old Hexbear fork has been officially abandoned, this community will be used as a space for meta-discussion on the site itself.

founded 3 years ago
MODERATORS