Automatically select GPT-5 Thinking model in new chats.
// ==UserScript==
// @name GPT-5 Thinking Autoselect
// @description Automatically select GPT-5 Thinking model in new chats.
// @version 1.10
// @author C89sd
// @namespace https://greasyfork.org/users/1376767
// @match https://chatgpt.com/*
// @run-at document-body
// @noframes
// ==/UserScript==
'use strict';
const CONF_EXTENDED_THINKING = 0;
const THINKING = '?model=gpt-5-thinking'
const EXTENDED = (CONF_EXTENDED_THINKING ? '&effort=extended' : '');
if (location.pathname === '/' && location.search !== THINKING + EXTENDED) {
location.search = THINKING + EXTENDED;
}
// Log prev/next for SPA navigations
const _pushState = history.pushState;
const _replaceState = history.replaceState;
function wrap(orig) {
return function (state, title, url) {
const prev = new URL(location.href);
const next = url ? new URL(url, prev) : prev;
const ret = orig.call(this, state, title, url);
//console.log(orig.name, 'prev:', prev.href, 'next:', next.href, 'current:', location.href);
if (next.pathname === '/' && prev.pathname !== '/') {
location.search = THINKING + EXTENDED;
}
return ret;
};
}
history.pushState = wrap(_pushState);
history.replaceState = wrap(_replaceState);