JanitorAI - Message Formatting Corrector (Mobile)

Formats narration and dialogues, and removes <think> tags.

Versione datata 03/10/2025. Vedi la nuova versione l'ultima versione.

Questo script non dovrebbe essere installato direttamente. È una libreria per altri script da includere con la chiave // @require https://update.greatest.deepsurf.us/scripts/551459/1671109/JanitorAI%20-%20Message%20Formatting%20Corrector%20%28Mobile%29.js

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
accforfaciet
Versione
4.0
Creato il
03/10/2025
Aggiornato il
03/10/2025
Dimensione
12,4 KB
Licenza
MIT

Summary

Tired of inconsistent AI formatting and annoying <think> tags on JanitorAI? This script automates the entire cleanup process with a single click, giving you perfectly formatted, immersive responses every time.

This version is specifically designed and styled for Mobile users.

Features

  • Mobile-Optimized Interface: The formatting button (✏️) is placed conveniently for easy thumb access on mobile screens.
  • Keyboard-Aware: The button automatically hides when you tap the message input field to type, and reappears when you're done, preventing the on-screen keyboard from covering it.
  • One-Click Formatting: Just tap the button to clean up the last AI message.
  • Smart Narration Formatting: Automatically wraps all narration (text outside of quotes) in asterisks for italics (*like this*), processing the text line-by-line for maximum accuracy.
  • Preserves Dialogue: Intelligently ignores text within quotation marks ("...") and backticks (...), leaving spoken lines completely untouched.
  • Automatic Tag Removal: Instantly cleans up the AI's response by removing distracting tags like <think>, <thought>, <thoughts>, <system>, and <response>.
  • System Prompt Cleaner: Detects and removes prepended system prompts (e.g., "The user said...*") that sometimes leak into the AI's message.

How to Use

  1. After the AI generates a message, you will see a pink floating button with a pencil icon (✏️) on your screen.
  2. Tap this button.
  3. The script will instantly perform its magic: it taps 'Edit' on the last message, applies all the formatting rules, and taps 'Save'.
  4. Enjoy your perfectly cleaned-up message on the go!

What Problem Does This Solve?

This script is for users who value a clean, consistent, and immersive roleplaying experience on their mobile devices. It saves you the tedious manual effort of editing each message to:

  • Add asterisks for narration.
  • Delete the AI's internal thoughts (<think>...).
  • Fix other formatting inconsistencies.

Stop editing and start chatting!


Note: This script is optimized for the Mobile layout of JanitorAI. If you are on a PC or desktop computer, please use the dedicated PC Version for a better layout.

In screenshots you can see an example message before and after clicking the edit button.