iDontLikeRufus

Removes mentions of "Rufus," Amazon's AI assistant, from the US Amazon webpage.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         iDontLikeRufus
// @namespace    https://greasyfork.org/en/scripts/540236-idontlikerufus
// @version      1.0.5
// @description  Removes mentions of "Rufus," Amazon's AI assistant, from the US Amazon webpage.
// @author       nexnot
// @match        https://www.amazon.com/*
// @match        https://smile.amazon.com/*
// @license      unlicense
// ==/UserScript==

(function() {
    'use strict';

    function removeRufusText() {
        const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT, {
            acceptNode: (node) => {
                if (node.parentElement && node.parentElement.offsetParent !== null) {
                    return NodeFilter.FILTER_ACCEPT;
                }
                return NodeFilter.FILTER_REJECT;
            },
        });

        let node;
        while ((node = walker.nextNode())) {
            if (node.nodeValue.includes('Rufus')) {
                node.nodeValue = node.nodeValue.replace(/Rufus/g, '');
                // You can change the ('') above to a different name (i.e. (/Rufus/g, 'myName') ) if you'd like to rename Rufus. Default is to replace it with whitespace (i.e. empty string). 
            }
        }
    }
    window.addEventListener('load', removeRufusText);

    const observer = new MutationObserver(() => removeRufusText());
    observer.observe(document.body, { childList: true, subtree: true });
})();