Translate Buttons for beta.character.ai

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

נכון ליום 12-12-2022. ראה הגרסה האחרונה.

יוצר
CriDos
דירוגים
0 0 0
גרסה
1.3
נוצר
12-12-2022
עודכן
12-12-2022
Size
2.98 קילו-בייט
רישיון
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.