Character.ai Custom CSS

Apply custom CSS styles to character.ai

Stan na 29-08-2024. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Character.ai Custom CSS
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Apply custom CSS styles to character.ai
// @author       Vishanka
// @match        https://character.ai/*
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    // Function to create or update a style element
    function updateCSSVariable(variableName, value) {
        document.documentElement.style.setProperty(variableName, value);
    }

    // Update the specific CSS variables
    updateCSSVariable('--G850', '#2B2C2D');
    updateCSSVariable('--G900', '#242525');
    updateCSSVariable('--G950', '#1E1F1F');

    // Custom CSS for specific classes
    const customClassStyles = `
        .mt-1.bg-surface-elevation-2 { background-color: #2B2C2D !important; }
        .mt-1.bg-surface-elevation-3 { background-color: #2B2C2D !important; }
    `;

    // Inject the custom styles for classes into the page
    GM_addStyle(customClassStyles);

})();