Claude Interface Enhanced

It tries to Enhanced Claude Interface

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Claude Interface Enhanced
// @namespace    http://tampermonkey.net/
// @version      0.7
// @description  It tries to Enhanced Claude Interface 
// @match        https://claude.ai/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=claude.ai
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function addDeleteButton() {
        // Check if button already exists
        if (document.getElementById('custom-delete-btn')) return;

        // Create delete button
        const deleteBtn = document.createElement('button');
        deleteBtn.id = 'custom-delete-btn';
        deleteBtn.textContent = 'DELETE';
        deleteBtn.style.cssText = `
            position: fixed;
            bottom: 10px;
            left: 100px;
            background-color: #ff0000;
            color: white;
            padding: 10px 20px;
            border: none;
            border-radius: 5px;
            font-size: 12px;
            font-weight: bold;
            cursor: pointer;
            z-index: 999999;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        `;

        // Click event with updated selectors
        deleteBtn.addEventListener('click', function() {
            // Find and click the new chat button to start fresh
            const newChatButton = document.querySelector('a[href="/new"]');
            if (newChatButton) {
                newChatButton.click();
            }

            // Alternative approach: clear the main content area
            const mainContent = document.querySelector('main');
            if (mainContent) {
                const conversationArea = mainContent.querySelector('.mx-auto.w-full.max-w-2xl');
                if (conversationArea) {
                    conversationArea.innerHTML = '';
                }
            }

            // Attempt to clear input area
            const inputArea = document.querySelector('.flex.flex-col.bg-bg-000');
            if (inputArea) {
                inputArea.innerHTML = '';
            }

            // Force refresh the page
            window.location.href = 'https://claude.ai/new';
        });

        // Add button to page
        document.body.appendChild(deleteBtn);
    }

    // Wait for page to load
    window.addEventListener('load', function() {
        // Initial attempt
        addDeleteButton();

        // Retry a few times to ensure button is added
        let attempts = 0;
        const maxAttempts = 5;
        const interval = setInterval(function() {
            if (!document.getElementById('custom-delete-btn') && attempts < maxAttempts) {
                addDeleteButton();
                attempts++;
            } else {
                clearInterval(interval);
            }
        }, 1000);
    });
})();