# AutoReviewComments - Pro-forma comments for SE

## No more re-typing the same comments over and over!

This script adds a little 'auto' link next to all comments boxes. When you click the link, you see a popup with 6 configurable auto-comments (canned responses), which you can easily click to insert.

This script was inspired by answers to this question on meta.

## Features

1. Read your comment before you post it!

Note that the dialog only inserts the text, it doesn't send the comment, nor does it flag anything; this is so that you can check the text before posting!

2. Customize the texts

Simply double click on a comment text or description in order to customize it. Hit the 'reset' button if you screw up. This customization is currently per-site. Note that the "Welcome to $SITENAME$" text is automagically inserted if the user is 'new' (member for less than a week), so you don't need to add that to your custom text (but you can if you want to, see '9' below).

If you need more/less than the default 6 comments, just carry on reading...

3. Quick user info

The dialog also includes a mini-summary of the user's activity (because if they haven't been back in months, there's no point writing them a comment).

4. Automatic notification of new versions

The script will also notify you if a newer version is created.

5. Import/export of custom comments

This helps with transferring custom comments between sites. The export/import 'format' is also conveniently presented as markdown, so you can post it in an answer below, and let others benefit from your words of wisdom.

Note that you can also use the Import to create an arbitrary number of comments (the default is 6). If there are too many, you can use the show/hide desc link to gain a bit of space.

6. Remote source for comments

If you get bored with copy/pasting your comments between sites and/or computers, you can use the 'remote' button to define a remote source for your comment texts. See here for more details.

7. Differentiated comments for questions/answers

If you prefix your comment title with [Q], it will be only displayed for questions ([A] for answers). Non-prefixed comments are displayed for both.

8. [type here], [username] & [OP] (& $MYUSERID$)

If the text [type here] is included in a comment, it will be automatically selected for completion when inserted. [username] will be replaced with the user's name (or just 'user' if nothing was found), and [OP] with the original poster's name (if found, else 'OP'). Also, $MYUSERID$ will be replaced with your user id for the current site.

9. Customise welcome message

The default message is "Welcome to $SITENAME$" - which is shown for any 1-week-old users. By clicking on the 'welcome' link at the bottom of the popup, you can opt to change this message, or leave it empty to show no messages at all. You can also 'force' the message for older users on a one-off basis. This is per-site.

## Installation, other info

Development of this app is being coordinated over on GitHub. Please see the relevant sections over there to review the source code, view the release notes, report bugs or add feature requests, or read the full documentation.

The app is available for installation:

You may also download the code and run the build process yourself to generate the userscript version as well as Chrome, Firefox and Opera extensions that you can install locally if you'd rather not use the store versions.

Note: Can be used in tandem with my other user script.

-
@Derek朕會功夫, because I resent the fact that Google are forcing me to pay to give something away. – Benjol Dec 3 '13 at 5:51
@hexafraction, FYI we've moved to GitHub. – Benjol Mar 3 '14 at 9:58
@MadaraUchiha, if you're interested, we've moved to GitHub as you suggested (though not quite gone the same file-splitting route as you envisaged) – Benjol Mar 3 '14 at 9:59
Don't work for me with firefox and greasemonkey – Jorge B. Sep 22 '14 at 15:35

## 54 Answers

The following message breaks the script, apparently due to the $in backticks: ###jQuery-$
Did you know that you only have to write jQuery in its long form once? By wrapping your code in (function($) { .... })(jQuery);, you can use $ no matter if noConflict has been used or not.
-

Is it possible that you could save the comments in a file so that when the script is updated I don't lose my custom comments?

-
You shouldn't lose your comments when the script is updated - has that happened? But, to answer your question: hit the import/export button and copy/paste the text to 'somewhere safe'... – Benjol Dec 8 '11 at 14:48
Note that you can now save your comments to a file, read here. – Benjol Apr 11 '12 at 12:14

Can you please add a feature that allows you to type [username] (or something of the like) and the script inserts the user's name? I don't know how hard that would be, but I know you are already grabbing the user name. If at all possible, I would really appreciate this! Thanks so much for all your hard work on this script.

-

Could you add classifications/grouping for comments?

I'd like to group my comments into

1. comments for question
2. comments for answers
3. Both

And only the relevant comments will show, when I click the auto-link.

-

Bug report:

Prefixing entries with [A] no longer shows these entries when adding a comment to an accepted answer. Only entries without a [A] or [Q] prefix are shown on such posts currently.

For my canned-messages set, where each entry is has either a [A] or [Q] marker, that means nothing is shown at all for accepted answers.

-

(sort-of, you can now customise the welcome message)

Bug observed with 1.2.4 and 1.2.5:

On some sites, instead of having the automatically-extracted site name in the comments, I get the question title. For example:

Welcome to Is Category Theory useful for learning functional programming?! Please don't add "thanks" as answers. Invest some time in the site and you will gain sufficient privileges to upvote answers you like, which is the Is Category Theory useful for learning functional programming? way of saying thank you.

This happens on Computer Science and Travel but not on Stack Overflow or Security or Stack Apps, so my guess is that whatever you're scraping there is a bit different on beta sites.

By the way, I would prefer to see Stack Exchange there (without the site name), at least on the sites which don't have a distinct branding (i.e. perhaps excepting SO, SU, SF and AU). Sentences like “Welcome to Computer Science!”, “the Travel way of saying thank you”, … don't make much sense.

-

The following message breaks stuff (results in HTML being inserted) etc.:

[**Please, don't use mysql_* functions in new code**](http://bit.ly/phpmsql). They are no longer maintained [and are officially deprecated](https://wiki.php.net/rfc/mysql_deprecation). See the [**red box**](http://j.mp/Te9zIL)? Learn about [*prepared statements*](http://j.mp/T9hLWi) instead, and use [PDO](http://php.net/pdo) or [MySQLi](http://php.net/mysqli) - [this article](http://j.mp/QEx8IB) will help you decide which. If you choose PDO, [here is a good tutorial](http://j.mp/PoWehJ).
-

(You can now override this if you don't like it)

Another bug: Every comment is prefixed with "Welcome to StackOverflow!" since recently. Doesn't seem to happen on all pages; http://stackoverflow.com/questions/9729546/jquery-script-being-executed-before-all-each-has-completed is one where it does happen though.

-

There should be a method to force the insertion of the Welcome message. This can be required because some new users might have and account for 2-3 weeks already but just now started to post questions or answers. They might have found SE, registered an account but then didn't return for a while. Often these people still are new to the site and a Welcome message is appropriate, especially if it got changed to include a link to a special Welcome meta page (which I did for my site TeX.SE).

-

As posting setups was mentioned being useful, here is mine:

###[Q]App recommendation
Please note that recommendations like *Is there an app for X* are off-topic here (see [What topics can I ask about here?](http://$SITEURL$/help/on-topic) for details). For where your question might fit better, you might want to look into [Where can I ask questions that aren't Android Enthusiast questions?](http://meta.android.stackexchange.com/q/371/16575)

###[Q]Development question
This site is for users of Android, which means that questions about development/programming are off-topic here (see [What topics can I ask about here?](http://$SITEURL$/help/on-topic)). Development questions are on-topic on our sister site [Stack Overflow](http://stackoverflow.com/questions/tagged/android).

###[Q]More than one question asked
The question-and-answer format of this site works best if you put each question in a separate question post. Please edit your post down to one question, and create new posts to ask any further questions. You'll get better answers that way.

###[Q]OP providing facts in a comment
The best way to add additional information to your question is by editing it, with the **edit** button. It is better visible that way, and comments are mainly for secondary, temporary purposes. Comments are removed under a variety of circumstances. Anything important to your question should be in the question itself.

###[A]OP adding a new question as an answer
Remember this is a Q&A site - so keep on editing your question with new information - this section is for actual answers. If you have another question, please ask it by clicking the [Ask Question](http://$SITEURL$/questions/ask) button.

###[A]OP using an answer for further information
This is a question-and-answer site, not a forum. Please use the **Post answer** button only if you have a solution to the problem, so that other users can see your question is not yet answered. You can click **edit** on the question to add more information to it.

###[A]Answers just to say Thanks!
Please don't add "thanks" as answers. Invest some time in the site and you will gain sufficient [privileges](http://$SITEURL$/privileges) to upvote answers you like, which is the $SITENAME$ way of saying thank you.

###[A]Nothing but a URL (and isn't spam)
Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.

###[A]Comments as an answer (new users)
Please don't add comments as answers. Invest some time in the site and you will gain sufficient [privileges](http://$SITEURL$/privileges) to upvote answers you like, or to add actual comments when seeking clarification of any issues.

###[A]Comments as an answer (experienced users)
Please don't add comments as answers. Use actual comments when seeking clarification of any issues.

###[A]Answer that is a question
If you have another question, please ask it by clicking the [Ask Question](http://$SITEURL$/questions/ask) button. Include a link to this question if it helps provide context.

###[A]Requests to OP for further information
This is really a comment, not an answer. With a bit more rep, [you will be able to post comments](http://$SITEURL$/privileges/comment). For the moment I've added the comment for you, and I'm flagging this post for deletion.

###[A]Another user adding a 'Me too!'
If you have a NEW question, please ask it by clicking the [Ask Question](http://$SITEURL$/questions/ask) button. If you have sufficient reputation, [you may upvote](http://$SITEURL$/privileges/vote-up) the question. Alternatively, "star" it as a favorite and you will be notified of any new answers.

Entries #1 & #2 are specific to Android Enthusiasts, but similar cases might exist on other stacks, too.

-

(I think)

marked as duplicate Dec 12 '13 at 16:36 UTC

This bug has been reported before and has already been heard. If those tags don't satisfy you, please don't ask the same question again.

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

'The previous bug is thankfully fixed, but...

When I import or write the comments, and click "save", the wrong titles are matched to the wrong comments, and some of them just lose their comments.

Also, the "A" and "Q" features do not work.

I'm using Chrome 30.0.1599.47 (Official Build 223717) beta-m, in case that matters.

###1
Please don't add "thanks" as answers. With just a bit more <s>money</s> reputation, you will gain sufficient [privileges](http://$SITEURL$/privileges) to upvote answers you like!!! You will also, then, be able to comment on the answers to say "+1! Thanks for the answer!" or something on the lines of that. Now, I'm just flagging this for deletion.

###2
Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.

###3
This is really a comment, not an answer. With a bit more    rep, [you will be able to post comments](http://$SITEURL$/privileges/comment). For the moment I've added the comment for you, and I'm flagging this post for deletion.

###4
Please use the *Post answer* button only for actual answers. You should modify your original question to add additional information.

###5
If you have another question, please ask it by clicking the [Ask Question](http://$SITEURL$/questions/ask) button.

###6
If you have a NEW question, please ask it by clicking the [Ask Question](http://$SITEURL$/questions/ask) button. If you have sufficient reputation, [you may upvote](http://$SITEURL$/privileges/vote-up) the question. Alternatively, "star" it as a favorite and you will be notified of any new answers.

###7
Please note that Homework questions are supposed to supposed to show more effort. For more details, please see the [Homework Policy](http://meta.physics.stackexchange.com/questions/714/how-do-i-ask-homework-questions-on-physics-stack-exchange).

###8
Please note that Non-mainstream questions are prohibited. Any instance of refuting currently accepted mainstream theories, such as General Relativity, or the Standard Model, is not allowed. Do not promote your own (or anybody else's, for that matter.) non-mainstream ideas. Anything which has not been published in a reputable journal is not mainstream. Physics is based on Mathematics. Popular Science is not real Physics. For more details, please see the [Non-mainstream Policy](http://meta.physics.stackexchange.com/questions/4538/is-non-mainstream-physics-appropriate-for-this-site).

###9
In future please reply to a user by using "@username", as I  have done here as an example. Else, they won't be notified. For example, to reply to me,  "@Dimension10", etc.

###10
You are asking for too many things in a question. You should ask each question as a separate question.

###11
Note that MathJax is supported here. Use it to render equations. If you are not familiar with MathJax, it is essentially LaTeX code (but it ***must*** be surrounded by $ signs for inline equations and $$ signs for other equations. E.g. $$E=\sum_{j=1}mc^3$$ results in$$E=\sum_{j=1}mc^3$$and $E=\sum_{j=1}mc^3 results in $E=\sum_{j=1}mc^3$. For a documentation of LaTeX, see [LaTeX](http://tobi.oetiker.ch/lshort/lshort.pdf)..

###12
If you have enough reputation to participate in [Meta](meta.physics.stackexchange.com) (that is 5 rep), you can try formatting at the [Sandbox](http://meta.physics.stackexchange.com/questions/389/formatting-sandbox). However, MathJax isn't supported at Meta (only on the main site, which is this), yet.

###13
You are expected to do a small search for the answer before asking questions here, as this way, it will be no effort on your part.
-

I would like to see some improvement to the "import/export" dialogue. Inserting any whitespace character (like a space) will result in something very undesirable. Example:

###Title 1
Text of comment 1

###Title 2
Text of comment 2

(note the space on the blank line) will, after clicking "save", turn into:

###Title 1
Text of comment 1

###Title 2

i.e. the space has replaced the text of my second comment (and the text has now vanished). It might also occur with multiple line breaks between two comments.

I got kind of frustrated when I lost most of my hand-crafted comments by this unexpected behaviour.

It is particularly nasty when editing one's comments in an editor (to avoid clicking outside the dialogue and losing all one's work) that uses CR+LF line endings -- the default for Windows.

Lastly, I'd like to have an easier way to add a new comment to my list -- this is currently only possible through the "import/export" dialogue, which can give rise to above drawbacks.

With that said, this script has saved me a lot of time, and I thank you for maintaining it!

-

The script doesn't work when sites are accessed via https. I believe you simply need to change

// @include http://*stackoverflow.com/questions*

to

// @include http*://*stackoverflow.com/questions*

I've changed this locally and it now works. I use the HTTPS Everywhere extension in Google Chrome so most sites I access are via https.

-

Being active on multiple sites, I've had some special requirements. So I've made a fork based on v1.3.0, which includes the following additional features:

• a variable $MYUSERID$ in the comments gets replaced by your userID on the current site
• you can have site-specific messages

The latter is done by adding an (optional) Site: "<hostname>" part to the defaultMessages. In import/export, this shows as an additional line starting with §§§. Importing from the "original script" here still works (but obviously has no site-specifics), exports from my "fork" must have the §§§ lines removed to import them into the "original one".

It's not yet "heavily tested", but in use by at least 3 people. Feel free to drop me a note (comments to this answer, for example) for feedback/questions. I'd be glad to see my "enhancements" integrated with the "master" (also to profit from future updates). so feel free doing so :)

Current version of the code hides behind the link above (a pastebin).

-
@Benjol In countless comments and chats (LOL), Caleb bombed me to create a Gist fork: AutoReviewComments - Pro-forma comments for SE (Izzy's fork). This should make it easier for you to merge as well – if you decide so, that is :) – Izzy Feb 25 '14 at 11:03

Here's an addition to the stock comments which I've found useful:

###Request for action on copyright violation
We don't have the authority to judge whether or not this constitutes a copyright
violation. All copyright violations should be reported to Stack Exchange, Inc.
in the form of a DMCA takedown notice from a copyright holder per
<a href="http://stackexchange.com/legal">site policy</a>.

Substitute 'users', 'moderators', or something else for 'We' if you like.

The relevant section in /legal is section 15, I've requested deep links on that page here.

-
Is that really a common review comment? I'm loath to touch the default 6. Most of my users have already customised, so they wouldn't see them anyway... – Benjol Dec 6 '11 at 18:07

It might be really nice if this could come pre-loaded with a in a few comments by default that will be global to all sites. There are already a couple good examples here.

Another useful one would be something about the accept rate.

Your accept rate is currently low, please review your existing questions. Please respond to any comments, please update to add more detail if possible, If there is correct answer, please accept, if any of the existing answers don't work please add a comment explaining why.

-

It would be great to be able to use this same functionality in the edit summary when making edits. Most of the edits I do fall into a small subset of "categories" and it pains me to have to put in the same summary over and over.

Adding a category (much like already exists for question-only or answer-only comments) would be a big help beyond just adding the "auto" link next to the edit summary input box.

To take it one step more, since edits may be for more than one thing at a time, a slightly different interface that is checkbox-based, rather than radio buttons would be ideal so that I could combine / chain the edits I've made.

In summary, here's what I am asking for (in order of priority / usefulness):

1. Adding the dialog link to the Edit Summary input
2. Adding a category for Edit Summaries
3. Changing the behavior for edit summaries to allow for adding multiple "comments"
-
I've created an issue on GitHub. No promises, but at least it's not lost. – Benjol Mar 3 '14 at 10:07

Can you add support for an Enter or Return keystroke to allow for insertion of the currently selected option? This would be really helpful! I have several custom comments and it can be a pain to scroll down to find the insert button.

-

At the moment the Welcome message for new users is not displayed if the question was migrated from a different SE site and the user does has an account on the target site yet. The message should be inserted in this case.

-

I am excitedly using the "much-requested override for the new user Welcome message." in V1.2.6, as one of those requesters.

The save function doesn't appear to be sticking. It works immediately, but when I come back later, it has returned to the default message.

(Chrome, Windows)

-
Oddthinking, thanks for letting me know. Fixed (or should be!) in 1.2.7 – Benjol Jan 22 '13 at 6:03

### Bug Report

I managed to install this with Tampermonkey on Google Chrome (Windows 7) along other scripts, except this script isn't working for me on Chrome (Firefox does work).

-

I have the problem that whenever I change or add any comments, my changes are gone after restarting my Firefox and all comments are back to the default values.

Has anybody a hint what this could be caused by? I use FF19 on Ubuntu and Autocomments 1.2.8. I also wonder if the noscript addon of FF could have any influence but for the SX sites all scripts are allowed.

Any hints or ideas?

-

(sort of)

Google Chrome is now making it harder to install the script for security reasons.

Upon clicking on the install link, a warning pops up refusing to install it. There's a Learn more link, recommending you use Google's oh-so-convenient distribution mechanism.

(There is a workaround for the user hidden in the text, which I am about to try.)

-

(I won't deploy just yet, I'd prefer to group this with other updates)

Mini suggestion: Open the update link in a new tab.

-