Unlock DeepSqueak model

Define o modelo "Deep Synth" como padrão em chats do Character.AI+ (CAI+)

Εγκατάσταση αυτού του κώδικαΒοήθεια
Κώδικας προτεινόμενος από τον δημιιουργό

Μπορεί, επίσης, να σας αρέσει ο κώδικας Unlock Nyan model.

Εγκατάσταση αυτού του κώδικα

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Unlock DeepSqueak model
// @namespace    https://github.com/irsat000/cai-unlock-deepsynth
// @version      2025-07-28
// @description  Define o modelo "Deep Synth" como padrão em chats do Character.AI+ (CAI+)
// @author       İrşat Akdeniz (modificado por Wallace)
// @match        https://character.ai/chat/*
// @icon         https://character.ai/favicon.ico
// @grant        GM_registerMenuCommand
// ==/UserScript==

(function() {
    'use strict';

    function getAccessToken() {
        const meta = document.querySelector('meta[cai_token]');
        return meta?.getAttribute('cai_token') || null;
    }

    GM_registerMenuCommand('Definir Deep Synth como padrão', setDeepSynthAsDefault);

    function setDeepSynthAsDefault() {
        const token = getAccessToken();
        if (!token) {
            alert("❌ Token de acesso não encontrado.\nCertifique-se de que a extensão CAI Tools está ativa.");
            return;
        }

        fetch("https://plus.character.ai/chat/user/update_settings/", {
            method: "POST",
            headers: {
                "accept": "application/json, text/plain, */*",
                "authorization": token,
                "content-type": "application/json",
            },
            body: JSON.stringify({
                modelPreferenceSettings: {
                    defaultModelType: "MODEL_TYPE_DEEP_SYNTH"
                }
            }),
        })
        .then(res => {
            if (res.ok) {
                alert("✅ SUCESSO!\nO modelo Deep Synth foi definido como padrão.\nRecarregue a página para aplicar.");
            } else {
                throw new Error("Erro HTTP: " + res.status);
            }
        })
        .catch(err => {
            alert("❌ Falha ao definir Deep Synth como padrão:\n" + err.message);
        });
    }
})();// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      2025-07-28
// @description  try to take over the world!
// @author       You
// @match        http://*/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
})();