ChatGPT Replace Profile Picture

Replace user profile picture with custom image

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         ChatGPT Replace Profile Picture
// @namespace    https://github.com/wbrandon25/ChatGPT-Change-Profile-Picture
// @version      1.1
// @description  Replace user profile picture with custom image
// @author       wbrandon25
// @match        https://chat.openai.com/*
// @grant        none
// @homepageURL  https://github.com/wbrandon25/ChatGPT-Change-Profile-Picture

// ==/UserScript==

(function() {
    'use strict';

    // ENTER YOUR CUSTOM IMAGE URL HERE
    const customImageUrl = 'https://cdn.discordapp.com/attachments/1092885792298373200/1107555201382109194/firefox_zrFofziNad.png';

    function replaceProfilePictures() {
        const images = document.getElementsByTagName('img');

        for (let i = 0; i < images.length; i++) {
            const img = images[i];

            if (img.classList.contains('rounded-sm') && img.getAttribute('data-nimg') === '1') {
                img.src = customImageUrl;
                img.srcset = customImageUrl;
            }
        }
    }

    replaceProfilePictures();

    document.addEventListener('DOMNodeInserted', function() {
        replaceProfilePictures();
    });
})();