Requires: greasemonkey/tampermonkey/other script injector.

If your home instance is federated with instances you don’t want to see, you can use this script to remove all posts and comments from that instance without having to block communities individually.

Example:

Line 17: const blockedInstances = ["example.ml","lemmy.world"];

Will block:

[email protected] posts to [email protected]

[email protected] posts to [email protected]

[email protected] comments on any post

Usage:

Edit the comma-seperated list on line 17 to the instances you wish to block. Add new ones inside quotes following a comma. Do not include https:// or trailing forward slashes in the instance text.

  • Someology@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    I truly hope the Lemmy devs start watching this community. So many great features that would be lovely added to the Lemmy code as user options.

  • Slated@vlemmy.net
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Sweet! Thanks this is a great use case. This could probably be pretty easily be built into the ui

    • RyanHx@vlemmy.netOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Yep I’m hoping we get more user-level control over the instances we see. This script is a naive client-side approach of just removing the HTML nodes of matching posts, but having it done on the server side would be ideal.

  • mershed_perderders@sh.itjust.worksM
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    Wait, does the “block communities” feature in profile settings only block communities on the home instance? If so, that seems like a substantial opportunity for improvement.

    • RyanHx@vlemmy.netOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      1 year ago

      Nope it can block other instance’s communities. This script will block all posts at an instance level though, rather than having to keep adding blocked communities when people create more on that instance.