20240808.0 [油猴脚本]开搞:Claude “时间管理” 😎 大师! 适配:Claude官网+第三方镜像站(claude.asia等)

接 ChatGPT 篇:

—分割线—


什么?Claude 你又偷懒!:anger:

脚本功能:
通过查看每个Claude网页的 favicon,直观了解当前回复的状态;
不需要点进去查看啦 :eyes:

回复状态
  1. “偷懒”
  2. 次数用尽
  3. 长度不足以输出
适配网站

Claude官网
Claude镜像站

其他计划

Claude “偷懒” 时,用prompt (可自定义),提醒它继续输出;:innocent:
(目前还没找到自动继续的脚本,Claude的脚本好少啊)

—分割线—

先让ChatGPT照着旧脚本糊了一个:

点击查看(beta版)脚本
// ==UserScript==
// @name            [Claude] State Favicons (20240808.0)v1
// @version         20240808.0
// @description     Changes favicon based on Claude AI chat state: 🔄 (responding), ✔️ (response complete), 👍 (ready to send), ❗️ (warning), original (waiting)
// @match           https://claude.ai/*
// @match           https://claude.asia/*
// @match           https://demo.fuclaude.com/*
// @icon            https://claude.ai/favicon.ico
// @grant           none
// ==/UserScript==

(function() {
    'use strict';

    const FAVICON_STATES = {
        RESPONDING: '🔄',
        COMPLETE: '✔️',
        READY: '👍',
        WARNING: '❗️'
    };

    const SELECTORS = {
        STOP_BUTTON: 'button[aria-label="Stop Response"]',
        SEND_BUTTON: 'button[aria-label="Send Message"]',
        NO_MESSAGE: 'div[aria-label="Write your prompt to Claude"]',
        ADD_MESSAGE: 'p[data-placeholder="Reply to Claude..."]'
    };

    let favicon;
    let originalFaviconHref;
    const faviconCache = {};

    function initializeFavicon() {
        favicon = document.querySelector("link[rel~='icon']") || document.createElement('link');
        favicon.rel = 'icon';
        favicon.type = 'image/x-icon';
        originalFaviconHref = favicon.href || "https://claude.ai/favicon.ico";
        document.head.appendChild(favicon);
    }

    function createFaviconDataURL(emoji) {
        if (faviconCache[emoji]) return faviconCache[emoji];

        const canvas = document.createElement('canvas');
        canvas.width = 64;
        canvas.height = 64;
        const context = canvas.getContext('2d');
        context.font = '64px serif';
        context.fillText(emoji, 0, 64);

        const dataURL = canvas.toDataURL();
        faviconCache[emoji] = dataURL;
        return dataURL;
    }

    function changeFavicon(state) {
        try {
            if (state === 'ORIGINAL') {
                favicon.href = originalFaviconHref;
            } else {
                favicon.href = createFaviconDataURL(FAVICON_STATES[state]);
            }
        } catch (error) {
            console.error('Error changing favicon:', error);
        }
    }

    function checkState() {
        if (document.querySelector(SELECTORS.STOP_BUTTON)) {
            changeFavicon('RESPONDING');
        } else if (document.querySelector(SELECTORS.SEND_BUTTON)) {
            changeFavicon('READY');
        } else if (document.querySelector(SELECTORS.ADD_MESSAGE)) {
            changeFavicon('COMPLETE');
        } else if (document.querySelector(SELECTORS.NO_MESSAGE)) {
            changeFavicon('ORIGINAL');
        } else {
            changeFavicon('WARNING');
        }
    }

    function observeChanges() {
        const observer = new MutationObserver(checkState);
        observer.observe(document.body, {
            attributes: true,
            childList: true,
            subtree: true
        });
    }

    function initialize() {
        initializeFavicon();
        checkState();
        observeChanges();
    }

    // Wait for the DOM to be fully loaded before initializing
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', initialize);
    } else {
        initialize();
    }
})();

其他:
ChatGPT脚本现在运行正常;

感兴趣的佬们,欢迎一起交流;:innocent:

----20240808.0

84 个赞

搞出来了吗

插眼

1 个赞

牛哇

1 个赞

插眼

1 个赞

cy

1 个赞

能无限使用吗?

1 个赞

啊这 :melting_face:

1 个赞

mark

1 个赞

我想了下,没有使用场景啊。一般就用一个都是持续对话的

3 个赞

搞七捻三软件分享

尝试了一下,很实用。就是下面始皇搭建的这个lobe网址填进代码,只会出现警告标志

  1. 基于 lobe-chat:https://chat.oaipro.com
1 个赞

蹲一下,占个楼

因为这个是lobechat, 不是官网/镜像 :melting_face:
你可以让 ChatGPT/Claude 帮你适配一下 :tieba_025:

蹲啥 :melting_face:

插眼,可以一直使用吗?

是指自动 continue 吗?
Claude 不像 ChatGPT,没有自带这个功能;

目前还没搞出来自动连接输出内容的功能,:sob:
我平时都是半自动的:


自用连接脚本,功能很简陋 :tieba_087:

—20240910

大佬搞粗来吗,我要写成本毕业论文听说写论文Claude比gpt好用,我搜到这里了

mark 有空试一下