ChatGPT Remove Profile Picture

Remove profile picture in chatgpt site

// ==UserScript==
// @name               ChatGPT Remove Profile Picture
// @namespace          fabulous.cupcake.jp.net
// @version            2023.04.08.1
// @author             FabulousCupcake
// @description        Remove profile picture in chatgpt site
// @license            MIT
// @icon               https://chat.openai.com/favicon.ico
// @match              https://chat.openai.com/chat*
// @run-at             document-idle
// ==/UserScript==

const removeImages = () => {
    const imgs = Array.from(document.querySelectorAll(`img[alt*="@"]`));
    imgs.forEach(img => img.remove())
}

const waitForElementToExist = (selector, action) => {
    const elm = document.querySelector(selector);

    if (elm !== null) return action(elm);
    setTimeout(waitForElementToExist.bind(null, selector, action), 1000);
};

const main = () => {
    waitForElementToExist(`img[alt*="@"]`, removeImages);
}

main();