Adds buttons to insert HTML formatting, and shows a live preview box of what the comment will look like
Adds buttons on top of comment boxes, to easily insert the HTML for formatting the comment text.
Below the comment box, adds a preview of what the final comment will look like.

After installing the script, open the configuration dialog to change the settings. Touching the code is not needed.
The button bar is added on:
On a page with comments, for example a work or your AO3 Inbox: in the main navigation of AO3, next to “About”, there’s a new menu item “Userscripts”.
From the “Userscripts” menu, select the “Comment Formatting Buttons” option.
A configuration dialog opens. Here, you can set your preferences.

It's inspired by the popular Comment Formatting Options script, but I created my own version from scratch, trying to fix issues I'd noticed and to add some new features.