#About

Spoilers get used pretty heavily on Puzzling.SE, and people have taken to using rot13 in comments (and chat) since there's no official spoiler mark-up outside of questions/answers. That's annoying, but this script will make your life easier.

[![rot13 at work][1]][1]

#Features

 1. Add rot13 spoilers to comments
   - Whenever you're typing a comment, surround any text you want to be spoilered with `rot13(<text to be spoilered>)`
   - A ROT13 link will appear to the right (between the Add Comment button and the help link)
   - Clicking ROT13 will convert all `rot13(...)` text in your comment (obviously clicking again will convert back)
   - Post your comment as usual
 1. Automatically convert existing rot13 spoilers in comments
   - Any comments containing spoilers in the format `rot13(<spoilered text>)` will automatically get highlighted
   - Hover the highlight to see the unspoilered text in the tooltip
     - **Edit (v1.5)**: "tooltip" is now an overlayed panel
   - <del>Click the link to see the unspoilered text in an alert popup</del>
   - **Edit (v1.5)**: Click the highlight to pin the tooltip panel in place, click again to hide (allows copy/paste, etc)
   - **Edit (v1.5)**: Handles nested parentheses in rot strings (thanks @GentlePurpleRain)
   - **Edit (v1.5)**: Preserves (most) formatting in and around rot strings (including links)
   - **Edit (v1.5)**: Supports fallback mode for non-"standard" rot strings (eg. rot13[...], (ROT13)..., Rot13:..., etc) which rots the entire comment
 1. **Edit (v1.2)**: Both the above features now also work in SE chat rooms

<sub>(I left the encoding process fairly manual so as not to be potentially annoying when writing/editing comments)</sub>

###Download/Source

[View script source](https://bitbucket.org/alconja/user-scripts/src/master/rot13-comments.user.js) / [Install / download](https://bitbucket.org/alconja/user-scripts/raw/master/rot13-comments.user.js)

###Platform

Tested with Greasemonkey in Firefox and with Tampermonkey in Chrome.


  [1]: https://i.sstatic.net/jhHDz.png