Hacker, writer, translator, unix & programming nerd.

  • 0 Posts
  • 14 Comments
Joined 1 year ago
cake
Cake day: August 6th, 2024

help-circle

  • Some websites are really cursed in how hard they make overriding their styles.

    Some things I usually do to handle these are using Stylus with Instant inject mode and some !important rules for a global dark theme.

    If that also fails, I have an anti-Flash-of-Unstyled-Content userscript ready to toggle per-website as needed:

    ;(function() {
    
      const css = `
        html, body {
          background: #222 !important;
          min-height: 100vh !important;
        }
    
        body > * {
          visibility: hidden !important;
        }
      `
    
      const style = document.createElement('style')
      style.id = 'antiFOUC-block'
      style.textContent = css
    
      const container = document.head || document.documentElement
      container.prepend(style)
    
      window.addEventListener('DOMContentLoaded', () => {
        const block = document.getElementById('antiFOUC-block')
        if (block) block.remove()
    
        document.body.childNodes.forEach(n => {
          if (n.nodeType === 1) {
            n.style.visibility = ''
          }
        })
      })
    })()
    

    It works by preventing display of content before it’s fully loaded. This won’t make websites dark on its own, just prevent the flash.

    (I have tested this with Violentmonkey on boardgamegeek.com plus a Stylus dark theme and it did solve it. With Dark Reader though it will still flash)

    If even that fails I have a second one that will strip all inline and !important styles, but it rarely ever comes to that.

    I hope this is helpful because being flashed with a fully white page makes me want to cry and punch my computer.



  • Mint is a glorious debloat of Ubuntu with several extras and are strategically wise in having LMDE ready and in production. They fill a very important role as an user-friendly not-DIY distro suitable for someone completely unfamiliar with Linux. I wouldn’t describe Fedora that way. It changes too fast for that use case and compared to Mint comes with not much preinstalled.


  • I wrote a small script that takes a query as its single argument and if it finds a matching filename in a given directory it shows that in a pager. If it doesn’t, it uses ripgrep to search inside that directory and returns the filenames in a picker. If I prepend the filename with e, it opens that file (either existing or new) in an editor. Then I track that directory with Git.

    This way I have a quick way to store, find and retrieve notes from the terminal itself.






  • jutty@blendit.bsd.cafetoaww@lemmy.world*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    12
    ·
    7 months ago

    in this thread, as a twist on the more common meme “is this AI” or the more accusatory variant “this is AI”, we doubt human intelligence instead

    I’m disheartened by comments stating “whats the point?” just because it’s hyper realistic. I do prefer less realistic art too, but the amount of dedication it must’ve taken this person to develop these skills and then the work on each painting, it speaks volumes beyond just being a replacement for a picture… You’d hang it on a wall and tell every visitor “this is a painting” and then each and every one of them would go NOOO


  • Not so much what’s preventing, but how hard it is to get away with it.

    Whatever closed-source software is doing on your system, there is no way to know to begin with, what it is that it is doing. You can only look at the outer effects it has, but you can’t examine it much. So even if a closed system is doing all sorts of things, as long as it’s stealthy enough, there would be no consequences at all.

    This is the very opposite is what you get with FOSS, not to mention the difference on how software is developed, built, distributed and managed in unix systems compared to proprietary ones.


  • If you see yourself facing this often, you can also use a browser extension to make it easier to see the post you are at in your instance.

    For Firefox and derivatives, the simplest one is Lemmy Link, which places a Lemmy icon next to links such as the sibebar’s !community link in the instructions for logged out users to find the community in their own instance. It has not been updated in two years, but still works.

    Another option is Kbin Link, which does the same thing and has seen recent updates but tends to trigger “this extension is slowing down…” notifications.

    A third one I found is Instance Assistant, which instead adds a “Find in my home instance” button to the sidebar. It does have some additional features, but I couldn’t get them to work. This one is also available for Chromium-based browsers.