Script Summary: Adds a 'quote' button to the standard comment/journal box controls at Roosterteeth.com.
This script was originally written to do something completely different. Fortunately, that functionality was included directly into the site, and is now available to users of all browsers.
The new version of the script adds a "Quote" button that works in three ways.
- When the user has no selection, clicking the button inserts "[quote]" and "[/quote]" (just as all the other buttons do with their respective tags).
- When the user has selected text within the text box, the button wraps the selected text with "[quote]" tags.
- When the user has selected text on the page outside of the text box, the button inserts that text (wrapped with "[quote]" tags) at the end of the text box.
- Note: If the user has already typed something in the text box, the button inserts a newline before inserting the quoted text.
Also, as recommended by RvB user Kwierso, the "[quote]" button now appears before the Color dropdown.
Update: The script has been highly simplified, and now also includes a "[code]" button as well (also recommended by Kwierso), which works in exactly the same way as the "[quote]" button.




