Greasy Fork镜像 is available in English.

ChatGPT Remove Profile Picture

Remove profile picture in chatgpt site

As of 2023-04-08. See the latest version.

// ==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 blurImages = () => {
    const randomDeg = parseInt(Math.random() * 360,10);
    const style = `filter: invert(48%) sepia(68%) saturate(3337%) hue-rotate(${randomDeg}deg) brightness(66%) contrast(103%); border-radius: 50%;`;

    const imgs = Array.from(document.querySelectorAll(`img[alt*="@"]`));
    imgs.forEach(img => {
        const origStyle = img.getAttribute("style");
        img.setAttribute("style", `${origStyle};${style}`);
    });
}

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

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

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

main();
长期地址
遇到问题?请前往 GitHub 提 Issues。