Since Elon Musk became Twitter’s CEO, he’s been pushing through a lot of changes to the social network. But perhaps…

  • Big P@feddit.uk
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Someone please make a lemmy client with a word filtering option so I can stop hearing about elmo

    • crowsby@kbin.social
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      I can do you one better with a Tampermonkey script that will replace every reference to his name on every webpage to either “the biggest twat on the planet” or “this dipshit”, depending on which works better syntactically.

      // ==UserScript==
      // @name         Text Replace
      // @version      0.1
      // @description  Text Replace
      // @author       SiameseDream
      // @include     *
      // @grant        none
      // @namespace beepboop
      // ==/UserScript==
      
      (function() {
          'use strict';
      
      var replaceArry = [
          [/ Elon Musk/gi,' the biggest twat on the planet'],
          [/Elon Musk/gi,'The biggest twat on the planet'],
          [/ Mr. Musk/gi,' this dipshit'],
          [/ Musk/gi,' this dipshit'],
          [/Mr. Musk/gi,'This dipshit'],
          [/Musk/gi,'This dipshit'],
          // etc.
      ];
      var numTerms    = replaceArry.length;
      var txtWalker   = document.createTreeWalker (
          document.body,
          NodeFilter.SHOW_TEXT,
          {   acceptNode: function (node) {
                  //-- Skip whitespace-only nodes
                  if (node.nodeValue.trim() )
                      return NodeFilter.FILTER_ACCEPT;
      
                  return NodeFilter.FILTER_SKIP;
              }
          },
          false
      );
      var txtNode     = null;
      
      while (txtNode  = txtWalker.nextNode () ) {
          var oldTxt  = txtNode.nodeValue;
      
          for (var J  = 0;  J < numTerms;  J++) {
              oldTxt  = oldTxt.replace (replaceArry[J][0], replaceArry[J][1]);
          }
          txtNode.nodeValue = oldTxt;
      }
      })();
      
      

      In practice it looks like this

        • Madbrad200@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 year ago

          There’s plenty of communities on Lemmy that don’t discuss Elon at all. Curate your own homefeed

          • Zima@kbin.social
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            are there any communities that discuss technology advancements ? I can’t find any sub for technology enthusiasts.

            edit: ah gotcha you’re just telling him to go away while trying to sound reasonable.

            • Itty53@kbin.social
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              You and the other guy both sound like you’re whining that free content isn’t being catered to your every taste for you when you have every tool at your disposal to curate your own content.

              Y’all are entitled as shit.

    • FaceDeer@kbin.social
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Why didn’t you downvote this thread? In kbin I can see who downvoted it and you’re not there.

      • Big P@feddit.uk
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Downvoting is kind of unfair because it is technology based, ignore button just ignores that specific post, unsubscribe unsubscribes me from all technology posts which I don’t want