Conversation

can one of y'all fedi nerds make me a firefox plugin that automatically replaces the text "expat" and "expatriate" with "immigrant"

2
0
1

@pharmafemboy you can probably use Word Replacer Max for this! I haven’t tried it but it looks like what you want

0
0
1

@pharmafemboy if you have something like tampermonkey, this userscript should work:

// ==UserScript==
// @name         stop being racist i am a building
// @namespace    http://tauon.dev/
// @version      2025-03-31
// @description  expat => immigrant
// @author       lily <lily@tauon.dev>
// @match        *
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function nativeTreeWalker() {
       var walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, null, false);
       var node;
       var textNodes = [];
       while (node = walker.nextNode()) {
          textNodes.push(node)
       }
       return textNodes
    }
    nativeTreeWalker().forEach(el => {
       if el.nodeValue.includes("expatriate") {
         el.nodeValue.replaceAll("expatriate", "immigrant*");
       }
       if el.nodeValue.includes("expat") {
         el.nodeValue.replaceAll("expat", "immigrant*");
       }
    });
})();
1
0
0