Greasy Fork is available in English.

cppreference balck mode

cppreference黑夜模式

14.03.2026 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         cppreference balck mode
// @description  cppreference黑夜模式
// @license      The Unlicense
// @version      1.1.0
// @author       girl-dream
// @namespace    https://github.com/girl-dream/
// @match        https://cppreference.cn/*
// @match        https://cppreference.dev/*
// @match        https://cppreference.tw/*
// @match        https://*.cppreference.net/*
// @match        https://*.cppreference.dev/*
// @match        https://*.cppreference.com/*
// @icon         https://cppreference.cn/favicon.ico
// ==/UserScript==

(() => {
    if (location.href.indexOf('cppreference.net') == -1) {
        const form = document.querySelector('form')
        const temp = form.querySelector('input')
        form.target = '_blank'
        form.action = 'https://www.bing.com/search'
        temp.name = 'q1'
        temp.value = `site:${location.host}`
    }

    const style = `
ins, .google-auto-placed,[id^="div-gpt-ad,carbonads"],#carbonads,#footer-icons {
    display: none !important;
}

table,
#content *:not(a):not(table):not(th):not(tr):not(tbody):not(.t-mark-rev):not(tt):not(.kw1):not(.co1 span) {
    color: #fff !important;
}

#cpp-content-base,
#cpp-footer-base,
#bodyContent,
body,
#cpp-head-first-base,
#cpp-head-second-base,
.mw-geshi,
#cpp-head-second-base span,
.t-member {
    background: #17181A !important;
}

input[name='q'],
button[type='submit'],
input[type='submit'] {
    background-color: #2d2d2d;
    color: #fff;
    border: 1px solid rgb(85, 85, 85);
    outline: none;
}

a,
tt,
a:visited,
[class^="sy"],
#footer-info-lastmod {
    color: #9198a1 !important;
}

th,
td,
table {
    background: rgb(40, 43, 48) !important;
}

[class^="kw"],
[class^="nu"] {
    color: #f5ab35 !important;
}

.mw-geshi {
    background: none !important;
}

.t-navbar-menu > :first-child {
    background: rgb(40, 43, 48) !important;
}

[class^="st"],
[class^="br"],
[class^="co"] {
    color: #339900 !important;
}

.coliru-btn {
    color: white !important;
    background: rgb(40, 43, 48) !important;
    box-shadow: none !important;
    margin-bottom: 6px !important;
}

.t-inherited {
    background-color: rgb(40, 43, 48) !important;
}
    `
    const styleSheet = new CSSStyleSheet()
    styleSheet.replaceSync(style)
    document.adoptedStyleSheets.push(styleSheet)
})();