Nuke Amazon's AI Rufus

Clean the internet with user scripts

User scripts are one of the better tools available to us for bending the internet to our will. A recent post covered downloading Twitter videos with one, and today we’re going to clean Amazon’s page by removing their annoying AI side panel.

Amazon Rufus Space
Rufus - Causing a massive blank area on the left to be annoying

A search on GreasyFork didn’t have any scripts that worked for this, so I made my own.

I just want to browse Amazon without annoying pop ups and Prime-only results visible. Everything else can go away. The script below runs in ViolentMonkey and removes the giant AI sidebar completely. You can copy / paste from below or download here if that’s easier for you.

The script

rufus_removal.js

// ==UserScript==
// @name         Amazon - Rufus Eliminator
// @namespace    local.amazon.rufus
// @version      1.2
// @description  Removes Rufus nonsense on the left sidebar
// @match        https://www.amazon.com/*
// @match        https://smile.amazon.com/*
// @grant        GM_addStyle
// @run-at       document-start
// ==/UserScript==
(function () {
    'use strict';

    GM_addStyle(`
        .rufus-docked-left {
            padding-left: 0 !important;
            --rufus-docked-panel-width: 0px !important;
            --total-rufus-panel-full-width: 0px !important;
            --total-rufus-panel-half-width: 0px !important;
        }
    `);

    const killRufus = (el) => {
        el.style.removeProperty('--rufus-docked-panel-width');
        el.style.removeProperty('--total-rufus-panel-full-width');
        el.style.removeProperty('--total-rufus-panel-half-width');
        el.style.setProperty('padding-left', '0', 'important');
    };

    const observer = new MutationObserver((mutations) => {
        for (const mutation of mutations) {
            const el = mutation.target;
            if (el.classList.contains('rufus-docked-left')) {
                killRufus(el);
            }
        }
    });

    document.addEventListener('DOMContentLoaded', () => {
        observer.observe(document.body, {
            attributes: true,
            attributeFilter: ['class', 'style'],
            subtree: true,
        });
    });
})();
` ` `

Questions or comments?

Previous: Optimize Your Life: Fix your Bookmarks Next: Optimize Your Life: Passwords