## 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, which you can easily click to insert.

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

## Features

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.

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]

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').

### 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.

(Note, you may like this fork from Oliver Salzburg)

## Installation

Click HERE to install the user script. (warning Google are making things difficult for non-store user scripts. A workaround is explained here. Or use a script manager, like tampermonkey. NEW Derek has kindly uploaded the script into the Chrome store.

For other browser-specific instructions, read the instructions here)

## Update info

V1.2.9 - Fix for braking change (thanks SE devs!), suggested by PeeHaa. (Any other suggestions not including setTimeout are welcome!)

V1.2.8 - Update to take advantage of new 'draggable dialogue' functionality.

V1.2.7 - Correct bug noted by Oddthinking, and implement the 'force welcome' function requested by Martin Scharrer.

V1.2.6 - Implement the much-requested override for the new user Welcome message. Correct a bug with mangled markdown and another due to modified SE markup.

V1.2.5 - Implement [OP] tag as suggested by Gaffi. 'Fix' for markdown/html conversion bug reported by Madara Uchiha.

V1.2.4 - Modify code to get script working in new Review (reported by Oliver Salzburg), hat-tip to Shog9 for the fix.

V1.2.3 - Slight modification to remote dialogue (details here). You can now use [username] as a wildcard (as suggested by daviesgeek). Corrected & bug noted by Oliver Salzburg

V1.2.1 - update to work with 10k tools (suggested/implemented by ThiefMaster)

V1.2.0 - one fix (remove greeting before switching to edit mode), and one feature: hit Enter key to submit (suggested by Bruno Pereira). Note that this isn't a major change, it's just my version comparison is string-wise, so V1.1.10 won't work.

V1.1.9 - fixed nasty javascript regex backreference replace bug (reported by ThiefMaster). For explanations see here and here.

V1.1.8 - fixed 'jQuery 1.7.1' bug, which stopped insert button being enabled. (No idea why it stopped working - though judging from this, maybe it should never have worked, as I was using attr("disabled", ""))

V1.1.7 - create pseudo categories for differentiating between comments for questions and comments for answers (suggested by oers) - simply prefix the comment title with [Q] or [A]

V1.1.6 - make script work in /admin/dashboard (for moderators, requested/implemented by Sathya)

V1.1.5 - make script work in /review (requested by Gilles (now uses jquery delegate for attaching events)

V1.1.4 - if the text [type here] is included in a comment, it will be automatically selected for completion (requested by daviesgeek)

V1.1.3 - include Registered/Unregistered in user info (requested by waiwai933).

V1.1.2 - Fixed bug when using 'magic' links (reported by Alex)

V1.1.1 - If you have descriptions auto-hidden, the selected one will still be shown (suggested by Alex).

V1.1.0 - bug fix. (SE's full.js is now delayed at load, so the unbind('click') was undoing my click() - fix from @balpha).

V1.0.9 -
- a) removed upgrading bits from previous version
- c) now uses internal notification for announcing new versions - d) corrected the 'new versions announced once only' (it never worked AFAICT)
- e) corrected the $SITEURL$ escaping 'quirk'
- f) stopped using .owner class for userinfo - g) corrected bug which showed greeting twice.

V1.0.8 -
- a) Mend see-through code.
- b) Make storage more neighbour-friendly (add prefix, backwards compatible).
- c) Allow variable number of custom comments (can only be modified via import).
- e) Use 'selfupdatingscript' for update checks
- f) Revert $SITEURL$ to not contain the http://.

V1.0.7 - add an import/export function - can be used to transport custom comments between sites (note the use of $SITEURL$ and $SITENAME$ tags),

V1.0.6 - changes to the list of included urls

V1.0.5 - suppress warnings on new updates if already installed (previously each site would tell you about a new update, even if you'd already installed it)

V1.0.4 - corrected two bugs in code detecting the appropriate userid to lookup

V1.0.3 - corrected a bug in rep formatting. Integrated a function to poll once a day for new versions and notify user if any found.

V1.0.2 - implemented customisation, using HTML5 storage to allow users to create/modify their own messages

V1.0.1 - some refactoring, corrected a bug in the regex that converted html to markup.

## Note

Any comments welcome, whether on the functionality or the code.

Can be used in tandem with my other user script.

## Credits

• TomWij (below) created a modified version of the script, which inspired my V1.0.8
• balpha came up with the clever (evil) way to make the script 'self-updating'

## Known issues/Future plans

• The main future plan is to get this script adopted by SE. I like maintaining it, but some of the usability niggles (sharing across sites is still clunky, even with the remote option) can only be resolved centrally. (Vote here if you agree!)
• Modifying the script so that it also works in edit summary (as per this request), and the custom off-topic close reason (as per this request).
-
I suggest you move your code into a well-organized GitHub repo. Then you can take advantage of the built-in Wiki and Issue manager to handle documentation and feature request/bugs. I've seen the gist, and it's very large, do you think you should separate your code into several files that work together? See the CV-pls Extension –  Madara Uchiha Jan 12 at 11:01
Just recently, this has stopped working for me on Firefox 22.0. The "Auto" button just does not appear anymore. –  John Saunders Jul 24 at 19:02
Stopped working in Chrome too. Stack Exchange probably pushed an update that altered the DOM in some way. –  Madara Uchiha Jul 24 at 20:16
@MadaraUchiha see below (note, this is not an 'official' fix, just to let you know where to up vote :) –  Benjol Jul 25 at 4:44

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).

-

## Feature Request

Have a selector that is similar to [OP] but it would select the poster of the answerer instead of the question. This would obviously only apply to comments on answers. It could look something like

[OAP] // stands for "Original Answer Poster"
[AP]  // stands for "Answer Poster"

-

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!

-

###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.

-
You did see that you can modify the comments yourself? If you really want to change them across all sites, you can hack the script (currently: in future I'm looking at being able to use 'global storage'). I think the current default comments are relatively applicable to all sites, and as the original intent was to help with reviewing, I didn't think of things like accept rate. –  Benjol May 12 '11 at 4:40

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.

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):

2. Adding a category for Edit Summaries
3. Changing the behavior for edit summaries to allow for adding multiple "comments"
-

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 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?

-
show 1 more comment

(sort of)

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

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

-

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).

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.

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.

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.

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.

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 won't deploy just yet, I'd prefer to group this with other updates)

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

-

I forked the script to create some quick-insert buttons.

Given how often I make use of this, I wanted to save the extra click.

-

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.

'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

###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

###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.

-