this post was submitted on 02 Sep 2023
38 points (100.0% liked)

Україна Ukraine

5 readers
1 users here now

Все про Україну Everything about Ukraine

founded 1 year ago
 

Elon Musk's X, formerly Twitter, has played an important role in allowing Russian propaganda about Ukraine to reach more people than before the full-scale war, according to a study by the European Commission.

you are viewing a single comment's thread
view the rest of the comments
[–] crowsby@kbin.social 3 points 1 year ago* (last edited 1 year ago)

I feel that, which is why I forked a tampermonkey script to replace his name globally. This is nice because it covers every site, which makes reading articles on WaPo and NYT much less irritating. Here's what this thread looks like on my end, for instance:

And the script itself:

// ==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;
}
})();