DeepSeek Auto Expert Mode

Automatically enables Expert mode on DeepSeek Chat interface after navigation or page load.

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         DeepSeek Auto Expert Mode
// @name:zh-CN   DeepSeek 自动启用 Expert 模式
// @description  Automatically enables Expert mode on DeepSeek Chat interface after navigation or page load.
// @description:zh-CN  在页面加载或路由切换后自动启用 DeepSeek 的 Expert 模式。
// @version      1.2026.04
// @namespace    https://github.com/clanedev
// @author       clane
// @match        https://chat.deepseek.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=deepseek.com
// @run-at       document-idle
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    function switchToExpert(){
        const expertBtn = document.querySelector('[data-model-type="expert"]');

        if (expertBtn && expertBtn.getAttribute('aria-checked') !== 'true') {
            expertBtn.click();
        }
    };


    const origPush = history.pushState;
    history.pushState = function(...args) {
        const result = origPush.apply(this, args);
        window.dispatchEvent(new Event('urlchanged'));
        return result;
    };

    window.addEventListener('popstate', onURLChange);
    window.addEventListener('urlchanged', onURLChange);

    function onURLChange() {
        const path = location.pathname;
        if(path === '/'){
            setTimeout(() => {
                switchToExpert();
            }, 100); // try 100~300ms
        }
    }

    onURLChange();
})();