Raw Source
asteriksme / Remove everything i don't like

// ==UserScript==
// @name         Remove everything i don't like
// @namespace    http://tampermonkey.net/
// @version      2024-09-20
// @description  Remove useless stuffs on common websites
// @author       You
// @match        https://*/*
// @grant        none
// @license      MIT
// @updateURL    https://openuserjs.org/meta/asteriksme/Remove_everything_i_don_t_like.meta.js
// @downloadURL  https://openuserjs.org/install/asteriksme/Remove_everything_i_don_t_like.user.js
// ==/UserScript==

/* jshint esversion: 8 */

(function() {
    const buildObserver = ([trigger, junk]) => (changes, observer) => {
        if (document.querySelector(trigger)) {
            observer.disconnect();
            document.querySelectorAll(junk).forEach((x) => x.remove());
        }
    };

    [
        ['iframe[src^="https://accounts.google.com"]', '#credentials-picker-container, #credential_picker_container'],
        ['.uU7dJb', '.uU7dJb'],
        ['a.pHiOh', 'a.pHiOh'],
    ].map(buildObserver).forEach((fn) => {
        (new MutationObserver(fn)).observe(document, {childList: true, subtree: true});
    });
})();