Edit: @redyoshi49q@furry.engineer has designed a better solution using only CSS, and this should be used instead of the old script! If you’re reading this page for the first time, ignore this message.

This userstyle adds a red heart next to people that are from your home server, and any other servers that you manually define. Spot your server buddies out in the wild!

Instructions:

  1. Install Stylus extension for firefox/chrome

  2. “Write new style” in the addon settings

  3. Copy paste the CSS code below in

  4. Modify the code around line ~11 in order to reflect your homeserver and any additional frendservers that you want to highlight

  5. Modify the code around line ~19 to reflect your homeserver

  6. (Optional) If you’d like your homeserver buddies to have a different marker, uncomment the various sections around line ~27 through ~50 by removing the /* and */ bits

  7. (Optional) Play around with different markers and colors!

CSS/Userstyle: https://gist.github.com/redyoshi49q/f1b2d1da0a8f7536aba1f8c3110d2dd8

  • Yote.zip@pawb.socialOP
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Strongly typed languages are definitely my jam. Develop slightly slower, debug 2x less, faster runtime. What’s not to like. Kudos for actually being a web developer - it makes my head hurt. Case in point: me writing all this complicated JS when the problem was cleanly solvable with attribute selectors in CSS. I’m technically fullstack but I mostly stay backend and application-level if I can help it. Web dev has too many options for how to accomplish something, and I never know what the proper answer is. I’m interested to see what general paradigm people will use to interact with lemmy - I feel there has to be a more efficient way than mutation observer. Lemmy’s HTML markup could stand to be more verbose as well - extra classes to hook onto for more precise manipulation.