Translate Buttons for beta.character.ai

Adds a translate buttons for character messages in the chat for beta.character.ai

当前为 2022-12-13 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

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

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

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

作者
CriDos
评分
0 0 0
版本
1.5
创建于
2022-12-12
更新于
2022-12-13
大小
3.0 KB
许可证
MIT
适用于

This script adds translate buttons to chat messages on the site beta.character.ai. When a user clicks on a translate button, the script will use the Google Translate API to translate the message into the user's default language. The translated message will be displayed in place of the original message, and clicking the translate button again will restore the original message.

To use the script, first ensure that you are on a chat page on the beta.character.ai site, for example: https://beta.character.ai/chat?char=12345. Then, the script will automatically add translate buttons to the chat messages.

The script uses the GM_xmlhttpRequest function to make API requests to the Google Translate service. It also uses the navigator.language property to determine the user's default language, and the setInterval function to periodically check for new chat messages and add translate buttons to them.

The script is licensed under the MIT license.