thinking arrow tapper

Aggressively collapses DeepSeek thinking blocks automatically on load and stream.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name thinking arrow tapper
// @namespace https://viayoo.com/
// @version 0.1
// @description Aggressively collapses DeepSeek thinking blocks automatically on load and stream.
// @author You
// @run-at document-eab
// @license MIT
// @match *://*/*
// @grant GM_registerMenuCommand
// @grant GM_setClipboard
// ==/UserScript==

(function() {
    'use strict';

    // Aggressive function to find and collapse open thinking headers
    function collapseThinkingBlocks() {
        // Find all elements containing the thinking headers
        const headers = document.querySelectorAll('div, span, button');
        
        headers.forEach(el => {
            const text = el.textContent || '';
            // Target elements that say "Thought for" or "Thinking"
            if ((text.includes('Thought for') || text.includes('Thinking')) && !el.hasAttribute('data-collapsed-by-script')) {
                
                // Find the closest clickable parent button/container for the fold toggle
                const clickableToggle = el.closest('[role="button"]') || el.closest('button') || el;
                
                if (clickableToggle) {
                    // Mark as processed immediately to prevent toggle loops
                    el.setAttribute('data-collapsed-by-script', 'true');
                    clickableToggle.setAttribute('data-collapsed-by-script', 'true');
                    
                    // Trigger click to collapse it
                    setTimeout(() => {
                        clickableToggle.click();
                    }, 50);
                }
            }
        });
    }

    // Run immediately on page load
    collapseThinkingBlocks();

    // Set up a MutationObserver to catch incoming streaming thoughts in real time
    const observer = new MutationObserver((mutations) => {
        for (let mutation of mutations) {
            if (mutation.addedNodes.length) {
                collapseThinkingBlocks();
            }
        }
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();
            if (mutation.addedNodes.length) c