Automatically enables Expert mode on DeepSeek Chat interface after navigation or page load.
// ==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();
})();