Anime GF Format Fix
A format fixer for Anime GF's chat. I made it for Plain RP and Text, because those were the most broken, but it fixes things in every response format.
If you use Plain RP or Text in Anime GF's Response Settings, you've probably noticed the chat still looks like Roleplay mode. Narration shows up in bold italics, as if it were wrapped in asterisks, even though the settings preview shows plain text.
The replies themselves are fine. The AI writes plain narration, but the chat adds the RP formatting back when it shows the message. On top of that, in every format the chat throws away emphasis inside dialogue, squashes extra spaces, adds a stray space after italic words, breaks code blocks, and only colors dialogue in straight quotes.
This script fixes how the chat looks.
What it changes
- In Plain RP and Text, narration and actions show as normal text instead of bold italics.
- Words the AI stresses in narration stay italic.
- The stray space the site adds after an italic word is gone, so
*her*. shows as "her." instead of "her ." and *un*real as "unreal".
- Extra spaces and tabs show up instead of being squashed into one, so status boxes, HUDs and other layouts lined up with spaces stay lined up.
- Text in single backticks (
like this) reads as part of the sentence in a color, instead of a monospace box. By default it uses your italics color, and you can pick your own.
- Code blocks in triple backticks show properly. The site breaks them by adding its italics asterisks around the block, which leaves "*```" on screen and an empty box below. The script fills that box with the block's real content and hides the broken lines.
- Dialogue in curly quotes (“like this” or ‘like this’) gets your quotes color. The site only colors dialogue in straight quotes ("like this").
- Bold text, dialogue colors and line breaks stay how they are, unless you pick your own colors.
- It works on old messages, new replies, regenerated replies and replies that are still coming in, plus your own messages.
It only changes what you see. Your messages, your saved chat and what gets sent to the AI aren't touched.
Using Roleplay mode?
Turn on Italics as written. In Roleplay, the actions you and the AI put in asterisks are supposed to be italic, so the script keeps those italic. What it fixes is everything the site italicizes on its own: any line outside quotes that has no asterisks still shows up italic, like **HP:** 10 in a status block. With this setting on, those lines show as normal text, and bold stays bold.
Settings
Open your userscript manager's menu while you're on Anime GF. Changes apply right away and are remembered.
- Format fix (on/off): the main switch. Turning it off turns the whole script off, every setting below included, so you see the site's normal look. Your other settings are remembered for when you turn it back on.
- Keep emphasis (on/off): keeps stressed words italic. With Italics as written on, it only matters when the original text can't be read.
- Italics as written (for Roleplay) (off by default): keeps italics exactly where the reply has asterisks and nowhere else, whatever Keep emphasis is set to. It's off by default because in Plain RP and Text the AI sometimes wraps narration in asterisks anyway, and there you want it plain.
- Dialogue emphasis color (italics/dialogue): whether stressed words inside dialogue use the italics color or the dialogue color.
- Dialogue emphasis (experimental) (off by default): brings back the italic and bold words the site removes from dialogue.
- Keep spacing (on/off): shows extra spaces and tabs as written. Spaces line up exactly. A tab becomes a fixed gap about four spaces wide, so use spaces if you want columns to match.
- Curly quote dialogue (on/off): gives curly-quoted dialogue your quotes color, double or single. It only changes the color, so this dialogue stays the normal text weight instead of the slightly bolder weight the site uses for straight-quoted dialogue.
- Backtick text as color (on/off): shows text in single backticks as colored text inside the sentence. Turn it off to get the site's monospace box back.
- Colors...: Anime GF lets you color base text, italics, quotes and OOC, but not bold or text in backticks. This opens a small panel where you can pick a bold color and a backtick color, each for yourself and for the character, or keep the default. It has its own color picker that works like Anime GF's, so you don't get stuck with your phone's.
About features that read the original reply
Italics as written, Dialogue emphasis and the code block fix read the original reply text the page already has. The code block fix uses it to get the block's content. Italics as written uses it to see which words really had asterisks. Dialogue emphasis uses it to find the italic and bold words the site drops from dialogue, and shows that line again with them back in place: *word* in italics (in the italics color, or the dialogue color if you picked that above), **word** in bold. The site's own line is hidden, not changed.
They depend on how Anime GF stores messages behind the scenes. If that changes, Italics as written goes back to the normal rules, and dialogue and code blocks go back to how the site shows them. Nothing else breaks.
If Anime GF fixes this
If the site ever fixes its formatting, you won't really need this anymore, so you can uninstall it. You can also keep it for whatever the site still doesn't do, like bold colors or emphasis inside dialogue.
Good to know
- While a reply is still coming in, you might see a stray
* for a moment. It goes away when the reply finishes.
- If your browser forces dark mode on websites (like Vivaldi's force dark mode), it lightens dark colors as it draws them, so a dark italics, quotes or bold color shows up pink or white. While Format fix is on, the script tells the browser the chat is already dark, so your colors show as you picked them. That works while your phone or computer is in dark theme. If dark colors still come out light, turn off your browser's website dark mode for Anime GF.
- Indentation at the very start of a line can't come back, because the site's Markdown removes it before the text reaches the page. Spacing in the middle of a line is kept.
- Columns lined up with spaces only line up when the screen is wide enough. On a phone, long lines wrap, so a simple layout with one item per line works best everywhere.
- A curly closing single quote is the same character as an apostrophe, so ‘single-quoted’ dialogue can end early when a word inside it ends in an apostrophe (like students’). Double curly quotes don't have this problem.
- The code block fix works when the block is the last thing in the reply, like a status box at the end. If more text comes after a block, the site's broken box swallows the rest of the reply, and the script leaves it as it is. Put code blocks at the end, or use single backticks for a one-line status.
- If the AI forgets a closing quote mark, a word later on that line might end up italic when it shouldn't. The script never deletes anything.
Made with AI
I had Claude, Anthropic's AI, do all of the work on this. I described the problem, ran its diagnostic script on the site and tested everything on my phone. Claude wrote all of the code and the tests.
Compatibility
Tested with Tampermonkey in Vivaldi on Android, and checked at laptop and desktop screen sizes. It should work in any Chromium-based browser (Chrome, Edge, Vivaldi, Brave) with Tampermonkey or Violentmonkey. Firefox and Safari haven't been tested.
Not affiliated with Anime GF.