Edit: @[email protected] 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

    Yeah, tampermonkey, violentmonkey, greasemonkey, whatever sort of userscript manager you’ve got!

      • mershed_perderdersM
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        1 year ago

        you’ll need to rewrite the @match https://pawb.social/* to work on all lemmy servers:

        @match https://*/c/*

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

          You just need to rewrite it so the first part matches your homeserver I think.

          There are many url schemes that potential usernames can show up on, e.g. /c/, /post/, /comment/, /u/, and worst of all, any top level site like https://pawb.social/ or https://google.com/ could be a lemmy front-page with usernames on it. Instead of running the userscript on every website you visit and then checking if we were on lemmy afterwards, I thought it was just easier to only run on your personal homeserver, which is where you should generally always be anyway (if I understand lemmy UX correctly)

          • GodM
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 year ago

            The way I’ve done mine is to detect universally if it’s a lemmy instance, and if it is, run. Otherwise just return.

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

              Yeah, that’s definitely an option, but then the script will have to check on every website you visit. Practically it’s not a problem but it feels a little weird. If there’s a good reason to run this script on foreign lemmy servers it’s not a problem to change to that style, but for right now I didn’t see a reason to make it global.

              • GodM
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 year ago

                when i install it i’ll just make it run globally, i see no reason why not x) i’m always visiting all the instances anyway cuz it’s better that way for now until better fedtools come out

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

            In its current iteration, the @match line needs to be switched to say @match https://sh.itjust.works/* for you.