ChatGPT - Enable Edit Button

Re-enable the edit button in ChatGPT conversations.

15.02.2025 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         ChatGPT - Enable Edit Button
// @namespace    ChatGPT - Enable Edit Button
// @description  Re-enable the edit button in ChatGPT conversations.
// @version      1.0
// @author       aciid
// @match        *://*.chatgpt.com/*
// ==/UserScript==


(function() {
    'use strict';

    function enableEditButton() {
        document.querySelectorAll('button[aria-label="Edit message"]').forEach(button => {
            button.removeAttribute('disabled');
        });
    }

    function applyStyles() {
        var style = document.createElement('style');
        style.innerHTML = "div.absolute.bottom-0.right-full.top-0{display:block!important;left:-50px!important;}";
        document.head.appendChild(style);
    }

    function observeChatChanges() {
        const chatContainer = document.querySelector('body');
        if (!chatContainer) return;

        const observer = new MutationObserver(() => {
            enableEditButton();
        });

        observer.observe(chatContainer, { childList: true, subtree: true });
    }

    // Apply styles and enable edit buttons for all messages on load
    applyStyles();
    enableEditButton();
    observeChatChanges();

    console.log('Tampermonkey script: Edit button enabled for all messages, including new ones, with styling applied.');
})();