JanitorAI - Dynamic Character Avatars

Logs the last bot message and shows an emotion-based avatar. Completly customizable.

当前为 2025-07-17 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
ZephyrThePink
评分
0 0 0
版本
1.7
创建于
2025-07-17
更新于
2025-07-17
大小
35.3 KB
许可证
MIT
适用于

JanitorAI - Dynamic Character Avatars

Overview

This Tampermonkey userscript adds dynamic, emotion-based avatars to JanitorAI chats. It analyzes the bot's last message and displays a character avatar that matches the detected emotion, making conversations more expressive and visually engaging.

Features

  • Automatic Emotion Detection: Uses Google Gemini API to analyze the bot's last message and determine the displayed emotion.
  • Dynamic Avatars: Shows a customizable avatar for each emotion and character.
  • Draggable & Resizable: Avatars can be moved and resized on the screen.
  • Mobile & Desktop Support: Works on both desktop and mobile browsers.
  • Customizable: Easily add or change characters and emotion images.

Setup Instructions

  1. Get a Gemini API Key:
  2. Configure the Script:
    • Open Tampermonkey dashboard, find the script, and click "Edit".
    • In Section 2 of the script, replace YOUR_OWN_API_KEY with your Gemini API key.
    • (Optional) Change the model if needed (default: gemini-2.0-flash).
  3. Save and Reload JanitorAI:
    • Save the script and reload your JanitorAI chat page. The avatar should appear when the bot sends a message.

Customization

Add or Change Emotions

  • In Section 1 of the script, you’ll find the characterEmotionAvatars object.
  • Each emotion is mapped to a number and an image URL.
  • To add new emotions:
    1. Add a new number and image URL to the character’s object.
    2. Update the emotion list in Section 5 (Gemini prompt) to match your changes.

Add More Characters

  • Add a new character to the characterEmotionAvatars object, using the same emotion number mapping.
  • Example: const characterEmotionAvatars = { Ashley: { ... }, Bob: { 1: "https://example.com/bob-happy.png", // Admiration 2: "https://example.com/bob-amused.png", // Amusement // ... add more emotions }, // Add more characters here }; - Make sure the emotion numbers and descriptions in the Gemini prompt (Section 5) match your avatar setup.

Tips

  • Only edit Sections 1, 2, and 5 for customization. Other sections are core logic.
  • If you add/remove emotions, always update the Gemini prompt so detection matches your avatars.
  • Avatars are draggable and resizable for convenience.

Support

For questions or help, you can contact me on discord (@xzeph__)