Skip to content

Instantly share code, notes, and snippets.

@joxan2137
Created May 3, 2025 10:08
Show Gist options
  • Save joxan2137/b3c7389744e209f7e03db10dc71a9456 to your computer and use it in GitHub Desktop.
Save joxan2137/b3c7389744e209f7e03db10dc71a9456 to your computer and use it in GitHub Desktop.
midnight theme for chatgpt.
// ==UserScript==
// @name ChatGPT Dark + Inter
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Use Inter font & darker colors on chat.openai.com
// @author You
// @match https://chatgpt.com/*
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
// 1) Inject Inter font
const link = document.createElement('link');
link.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap';
link.rel = 'stylesheet';
document.head.appendChild(link);
// 2) Override ChatGPT CSS
GM_addStyle(`
/* Apply Inter everywhere */
body, button, textarea, input {
font-family: 'Inter', sans-serif !important;
}
/* Darken backgrounds */
:root {
--gray-600: #2b2b2b !important;
--gray-700: #252525 !important;
--gray-750: #252525 !important;
--gray-800: #0f0f0f !important;
--gray-900: #090909 !important;
}
.dark {
--message-surface: #1b1b1bd9 !important;
}
#thread-bottom > div > div > div.relative.z-1.flex.max-w-full.flex-1.flex-col.h-full.max-xs\:\[--force-hide-label\:none\]
`);
GM_addStyle(`
form[data-type="unified-composer"]
div[contenteditable="true"][role="textbox"] {
background-color: #1E1E1E !important;
color: #E0E0E0 !important;
font-family: 'Inter', sans-serif !important;
}
/* Placeholder text color (if shown) */
form[data-type="unified-composer"]
div[contenteditable="true"][role="textbox"]::placeholder {
color: #888 !important;
}
`);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment