Learn AI

解除限制

目前為 2023-05-09 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Learn AI
// @namespace    https://chat.cutterman.cn/
// @version      0.1
// @description  解除限制
// @author       Aasee
// @match        https://chat.cutterman.cn/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=https://chat.cutterman.cn/
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    const jquery= document.createElement('script');
    jquery.src = 'https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js';
    const head = document.getElementsByTagName('head')[0];
    head.appendChild(jquery);

    function refresh(){
        let token = "";
        $.ajax({
            type : "POST",
            url: "https://www.cutterman.cn/chat/user-info",
            data: "",
            success: function(res) {
                //localStorage.setItem("access_token",res.access_token);
                token = res.access_token
            },
        });
        const { fetch: originalFetch } = window;
        window.fetch = async (...args) => {
            let [resource, config] = args;
            config.headers['Authorization'] = token
            const response = await originalFetch(resource, config);

            // response interceptor

            return response;
        };
    }

    let count = 0;
    window.onkeydown = function(e){
        if(e.keyCode === 13) {
            count +=1;
            if (count >= 2){
                //setTimeout(refresh(),100);
                refresh()
                count = 0;
            }
        }
    }

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址