Delete-WikiDonations

Removes all references to Wikipedia donation banners and links.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Delete-WikiDonations
// @namespace    Violentmonkey Scripts
// @version      1.2
// @description  Removes all references to Wikipedia donation banners and links.
// @author       Lucas11
// @license MIT
// @match        https://*.wikipedia.org/*
// @grant        none
// @require      https://cdn.jsdelivr.net/npm/@violentmonkey/dom@2
// @require      https://cdn.jsdelivr.net/npm/@violentmonkey/[email protected]
// ==/UserScript==

VM.observe(document.body, () => {
    const centralNotice = document.querySelector('#centralNotice');
    if (centralNotice) centralNotice.remove();
    const donateLinks = document.querySelectorAll('#pt-sitesupport, #pt-sitesupport-2');
    donateLinks.forEach(el => el.remove());
    const extraDonationElements = document.querySelectorAll(`
        .cn-fundraising,
        .frb,
        .frb-inline,
        .frb-dialog,
        .frb-dialog-iad,
        .frb-nag,
        [class*="donate"],
        [id*="donate"],
        .fundraising,
        .frbanner,

    `);
    extraDonationElements.forEach(el => el.remove());

    return true;
});