472

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.

Thumbnail

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.

    Screenshot

Installation, other info

Development of this app is being coordinated over on GitHub.
Please see the relevant sections over there to:

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.

Please report new issues or feature requests on our issue tracker!

Glorfindel
  • 6,772
  • 3
  • 20
  • 46
Benjol
  • 1,711
  • 3
  • 13
  • 19
  • Why isn't the Chrome extension hosted on WebStore? – Derek 朕會功夫 Dec 03 '13 at 02:58
  • 8
    @Derek朕會功夫, because I resent the fact that Google are forcing me to pay to give something away. – Benjol Dec 03 '13 at 05:51
  • @Benjol - I have packed it into an extension: https://chrome.google.com/webstore/detail/denkbaalahjlbbfnifkacdigaofcnogg :) – Derek 朕會功夫 Dec 03 '13 at 21:53
  • 1
    How do I use this script to send an @message to the OP? Could you make this script automatically replace the spaces in OP's name when using @[OP] or @[username] anywhere in the prefilled comments? – joeytje50 Jan 27 '14 at 03:54
  • 1
    @joeytje50. @[OP] works, but if they've got spaces in their names, you'll just have to make do, I'm afraid. Or hack the script yourself a bit. – Benjol Jan 27 '14 at 06:57
  • This app is amazing! One thing I'd like to try is to have an auto link (similar to the $SITEURL$ shortcut) to get the link to edit a post (to suggest new users to use the edit button). Is it possible to do this? – Edlothiad Feb 16 '17 at 14:10
  • @Edlothiad, I don't see exactly how, to be honest (especially if it has to be able to handle questions & answers) – Benjol Feb 17 '17 at 08:27
  • I dunno what broke, but for Stack Overflow, it's saying "Welcome to Where Developers Learn, Share, & Build Careers!" https://i.stack.imgur.com/6aldX.png :-D – Bhargav Rao Feb 03 '18 at 08:40
  • @BhargavRao, click on the Welcome link at the bottom, I think you can adjust your welcome message there. This should only appear for new users, I think. – Benjol Feb 08 '18 at 14:05
  • @Benjol, Yup, I adjusted that. It used to say "Welcome to Stack Overflow" earlier. I think this is related to why it's picking up that message automatically - https://meta.stackoverflow.com/questions/351540/where-do-developers-learn-share-build-their-career – Bhargav Rao Feb 09 '18 at 01:19
  • This question is being discussed here. – Brock Adams Sep 04 '18 at 18:42
  • @BrockAdams I don't think that the section you added does much good, because I filed an issue there at the GitHub link only to be told that the script is no longer being maintained. – gparyani Sep 30 '18 at 06:52
  • @gparyani, provide a link. The code was just updated 10 days ago. At first glance it looks like it's being maintained at least somewhat. – Brock Adams Sep 30 '18 at 07:57
  • @BrockAdams https://github.com/Benjol/SE-AutoReviewComments/issues/154#issuecomment-420615524 – gparyani Sep 30 '18 at 08:04
  • @BrockAdams, the first was an issue, the second a pull request. Not the same level of work required. – Benjol Oct 01 '18 at 08:31
  • @Benjol, I know that and not really the point. Are you saying that this script/extension is no longer supported? If so, you should edit the post. – Brock Adams Oct 01 '18 at 09:17
  • Wonderful tool! The Greasemonkey script is slightly buggy, but it works well enough. Any ETA on an addon for FireFox? – Gendarme Feb 12 '19 at 19:58
  • 2
    IIRC There used to be a Firefox addon, but we gave up chasing after the moving goalposts. – Benjol Feb 15 '19 at 10:43
  • I think this might be part of the problem, why SO's quality dropped so drastically. – Xan-Kun Clark-Davis Dec 23 '20 at 21:21
  • greasemonkey script requires a patch for the close dialog. – aleksandr barakin Jan 19 '21 at 08:34
  • @Benjol The extension no longer exists on Chrome Web Store. It also doesn't seem to exist for Opera (besides the Firefox add-on that the GH page says has been deprecated). What happened? – 41686d6564 Oct 21 '22 at 11:18
  • 1
    @41686d6564standsw.Palestine, I - and the other people who maintained it - got older. There's an unattended git repo here: https://github.com/Benjol/SE-AutoReviewComments – Benjol Oct 28 '22 at 07:30

57 Answers57

52

Future ideas: use HTML5 storage to allow users to create/modify their own messages.

enter image description here

  • double click on a title or description to modify
  • save/cancel
  • 'reset' link at bottom of popup (not shown above) resets all custom messages to default

Important

  • The 'Welcome to SiteName!' text is prepended automatically if the user has been member for less than a week.
  • This uses HTML5 Storage, so custom texts only work on the site where they were entered.

NOTE

With this modification, there is no longer any reason that this userscript should be strictly limited to 'review'.

Benjol
  • 1,711
  • 3
  • 13
  • 19
  • 8
    How can I make it so that it doesn't say "Welcome to Stack Overflow!". I really don't want this. – casperOne Dec 29 '11 at 23:12
  • @casperOne, no, not at the moment, sorry. You could hack it out of the script manually. (It only shows for 'new' users) – Benjol Jan 03 '12 at 06:43
  • I second @casperOne's request. I'd really like that "Welcome" noise to be optional. Can this be made an option? Either global, or using [magic] tags for each comment as you do elsewhere? – Cody Gray - on strike Mar 28 '12 at 03:26
  • @CodyGray, it's status-planned (hidden in the comments here), no promises about when, though (to be honest, the main 'problem' is deciding how to present the option). Do you think that making it optional/configurable per comment makes sense? – Benjol Mar 28 '12 at 04:58
  • Not necessarily. I just thought that might be easier to implement; you know, the "lazy developer's response", as you put it. I'd be perfectly content with it being a global setting. Maybe better yet, this would all be configurable per site. So I could disable the welcome text on Meta.SO, but leave it enabled on the SE 2.0 sites. In the same way, the name used for each site would be customizable to make Jon Ericson happy. – Cody Gray - on strike Mar 28 '12 at 05:16
  • @CodyGray, ok, thanks for the feedback. Pending implementation, you could comment out line 234... BTW, while I have your ear, what would you think of the idea of providing a per-site option to dynamically load comments from an external source (e.g. Dropbox)? – Benjol Mar 28 '12 at 06:18
  • You mean so that the comments could be shared with other users on that site; for example, so that moderators could easily synchronize with one another? Or do you mean for each person's private use? The former would be really cool, but I don't think I'd get much use out of the latter. Not sure what it would hurt, though. People might like to share their customized comments between multiple machines, like home and work. – Cody Gray - on strike Mar 28 '12 at 06:34
  • Mostly the latter two reasons, though the first use case would be covered too. If you have broadly the same comments across multiple sites (and machines), currently you have to copy/paste manually every time you modify something. I did experiment with using global storage for this, but the code is very unwieldy (and it needs two scripts) – Benjol Mar 28 '12 at 06:55
  • @CodyGray, http://stackapps.com/a/3281/876 :) – Benjol Mar 29 '12 at 09:46
  • @casperOne, forgot you'd left that comment, your welcome message request is not status-completed, if you hadn't already noticed! – Benjol Feb 09 '13 at 22:06
50

Please report new issues or feature requests on our issue tracker!

The work on making this a full-blown GitHub based project originally outlined in this answer is now complete. All further feature requests and bug reports should be directed at the GitHub issue tracker.

And if you had raised an issue in the comments or answers below, and it's still unresolved, please open an issue on the GitHub project page.


I have taken the liberty of doing some organization.

  1. I have created a full blown Github repo here. The master branch is the latest from benjol's gist and all commit history is included. The master branch can be installed from this alternate location as a userscript using this url. This should make it easier for others to fork and send pull requests with changes back upstream.

  2. I have created branches that include all the gists that had been forked off of this and merged in those commits. Most of these are behind master and would need rebasing, but at least no work will be lost in the shuffle and this should make it easier to review and integrate their work.

  3. I have created a fork of my own and selectively merged in changes from the branch that came from Izzy's work in gist. His work includes changes so that custom comments are stored and retrieved per-site, but it also included his default comments hard coded in. I cherry-picked just the functional stuff and made a few tweaks. I have tentatively called this 1.4.0-beta1 and can be installed as a userscript from this link. There are some known bugs still but when it's ready I'll submit a pull request and maybe these can be merged into master.

This was just leg work to get everything cleaned up and manageable using a full repo instead of gists which were gitting out of hand.

Brock Adams
  • 12,901
  • 5
  • 38
  • 64
Caleb
  • 300
  • 4
  • 10
  • 1
    Why this isn't part of the main site instead of browser add-on? Users will find this very useful if this was part of main site. – mangupt Apr 18 '21 at 04:54
27

(used this fix in V1.2.9)

Some people are experiencing a problem where the auto link does not appear. This has to do with the fact that the DOM elements on which the selector is based are dynamically loaded into the DOM.

The workaround for this is to change line 683 to:

setTimeout(function() {
    $('#' + divid).find('.comment-help-link').parent().append(newspan);
}, 10);

Basically this is just a minor time out before trying to add the link, which should not be noticeable.

I'm not 100% sure about the 10 milliseconds, but it works for me (Chrome Canary). If it still doesn't appear for you try 100 milliseconds or something like that.

Benjol
  • 1,711
  • 3
  • 13
  • 19
PeeHaa
  • 315
  • 3
  • 14
  • You said it yourself :) If you catch balpha in chat, please try asking him (he helped me last time they 'screwed up'). If I see him first I'll do so... – Benjol Jul 25 '13 at 04:37
  • I may have found a culprit, following up now :) – Benjol Jul 25 '13 at 06:34
  • You were not suppose to read that chat message ;-) In all seriousness I doubt the fact there is console output is what makes things go wrong. Then again I suck as you noted so I may be wrong about this :-D – PeeHaa Jul 25 '13 at 07:59
  • By status-planned, does it mean that we'll have to reinstall it after it's completed, or automatic? And will the customisation be reset to the default? . –  Jul 27 '13 at 09:09
  • This doesn't work for me in Firefox 22 – Cody Guldner Jul 28 '13 at 17:03
  • @CodyGuldner Have you tried with a higher timeout? – PeeHaa Jul 28 '13 at 17:09
  • Whoops. Forgot to enable greasemonkey ;) – Cody Guldner Jul 28 '13 at 17:28
  • You can hardly blame me for that ;-) @CodyGuldner – PeeHaa Jul 28 '13 at 17:59
  • Worked fine for me, too, with FF 17 on Ubuntu and Vista (default timeout kept). – Izzy Jul 29 '13 at 08:33
  • Works well. Chrome Ubuntu. – Madara's Ghost Jul 30 '13 at 15:48
  • Worked for me. FF22 Win8 – Jamiec Aug 02 '13 at 14:29
  • @Dimension10, it means I was hoping for a tip from the dev team to help me avoid this hack. None forthcoming, so I'll go with this from PeeHaa, holding my nose at the same time :) Sorry I didn't answer sooner, you didn't @ me... – Benjol Aug 12 '13 at 10:24
  • @Benjol: So does that mean I have to reinstall, and that the customisation will be set to the default? –  Aug 12 '13 at 10:39
  • 2
    @Dimension10: the script auto-checks for updates everyday, so you can just wait. A new version will not override any customization of comment texts, no. – Benjol Aug 12 '13 at 11:28
  • @Benjol: No, it's still not working... –  Aug 14 '13 at 13:26
  • @Dimension10. Are you sure you've got the latest version installed? You might want to try increasing the timeout from 15 to something bigger. Failing that I don't have any ideas right now, I'm afraid. – Benjol Aug 14 '13 at 13:34
  • @Benjol: I'm quite sure it's the latest. How do I change the timeout? . –  Aug 14 '13 at 13:35
  • @Dimension10 What browser and what version are you running? – PeeHaa Aug 14 '13 at 15:14
  • @PeeHaa: Chrome 29.0.1547.49 (Official Build 216092) beta-m –  Aug 14 '13 at 15:15
  • @Benjol, PeeHaa : It works now, but only on stackapps . –  Aug 14 '13 at 15:16
  • @Benjol I am getting the information that there is an update available but not the actual update (neither in FF nor in Chromium) - any ideas? Is that because I edited my version of the script to put the TIMEOUT fix into it? – guntbert Aug 23 '13 at 14:58
  • @guntbert, the link from the notification redirects here deliberately (so that people will read what's new), then you have to click through as you did for the first install. Here is the link for you :) – Benjol Aug 26 '13 at 05:34
26

(GitHub issue)

Can we have the auto link appear when completing a custom "off-topic" closure reason?

Bonus points if we can declare certain auto-comments to apply in this scenario (e.g. mirroring the "A" and "Q" prefix for answers and questions). Perhaps "C" for closure reasons?

example

double-beep
  • 681
  • 4
  • 14
Duncan Jones
  • 141
  • 2
  • 5
18

There are two 'major' changes to V1.2.2

'Remote' comment source

You can now define an external source for your comments, and 'import' them. This means that you don't have to manually copy comments from site to site and PC to PC.

To do this, you click on the 'remote' link; enter the url for your data source; then click on 'get now'.

The data source must be formatted as jsonp. There is a new 'jsonp' link in the import/export dialog which will create the appropriate jsonp from your existing comments.

It is also possible to automatically invoke it every time you open the dialog, by selecting the auto-get checkbox. I'm interested in feedback on this.

'Broadcasts'

I've added a function to be able to 'broadcast' messages without changing the code. The intended use for this will be to ask for feedback on proposed future changes. Taken this off-line again, it was not completely thought-through and you had to dismiss on every site... (sigh, no global storage)

Benjol
  • 1,711
  • 3
  • 13
  • 19
  • Where do you recommend storing the comments for the external source? Github maybe? – Kit Menke Apr 05 '12 at 16:20
  • @KitMenke, for testing I used DropBox, the poor man's web server. – Benjol Apr 05 '12 at 17:59
  • If you could have it automatically update the remote sources, that'd be great. – jrg May 15 '12 at 22:44
  • @jrg, I'll bear it in mind. For the moment, you could try this (I haven't tested): at line 581 add this code: LoadFromRemote(GetStorage("RemoteUrl"), function () { WriteComments(popup); }); – Benjol May 16 '12 at 04:54
  • 1
    @jrg, actually, don't. There seem to be problems with parallel ajax queries here. While trying the next version I found the comments sometimes just disappear and never come back. – Benjol May 23 '12 at 12:21
  • @Benjol I'm glad I did try that then. :P – jrg May 23 '12 at 12:28
  • Has this evolved any? Is local storage used? I probably don't want a remote call every time I use the script (which is often), but once per browser session would be great. (I plan on using an Github Gist, btw.) – Raphael Jan 19 '16 at 14:22
  • @Benjol, could the remote comment source be expanded to sync all md files in a given github repo? – Tobi Nary Mar 11 '16 at 23:22
  • @SmokeDispenser, you'll get more luck on github (though I haven't done much work on the extension recently) – Benjol Mar 14 '16 at 07:09
  • Has anyone managed to get this to work with a GitHub repository, I have tried to get this to work with this repository but when I try and use the plugin to pull the jsonp down it never completes. – Richard Slater May 06 '16 at 21:28
  • 4
    Just in case anyone else is looking to do this, if you want to store your JSONP on GitHub you will need to use the file extension .js and then use RawGit to serve the content up using the correct, executable, mime type. – Richard Slater May 06 '16 at 21:37
  • Where is the "remote" link this comment asks me to click on? All I see is the "auto" link next to the comment box. – Noumenon Jun 06 '16 at 16:07
  • @Noumenon, it's after you've clicked on the auto link that you'll see the remote link. – Benjol Jun 07 '16 at 05:16
  • @RichardSlater Thanks Richard! I was finally able to get this working with your steps. – JeffC May 22 '17 at 19:40
  • I uploaded my comments to GitHub Pages but it always says "parsererror". – iBug Nov 19 '17 at 10:00
  • 1
    RawGit says it is going away, is there another way to set the content type from Github? – Stephen Ostermiller Aug 17 '21 at 00:06
15

I'll drop my setup here.

###Comment as answer
__This is not a forum. Please only use the 'Post Your Answer' button if you can answer the asker's question; <a href="http://gaming.stackexchange.com/privileges/comment">post a comment</a> otherwise.__ We require some <a href="http://gaming.stackexchange.com/faq#reputation">reputation</a> before you can comment others' posts to prevent abuse; why don't you try and get some by <a href="http://gaming.stackexchange.com/unanswered">answering a question?</a>

###Question as answer
__This is not a forum. If you have a different question from the asker's, please use the <a href="http://gaming.stackexchange.com/questions/ask">Ask Question</a> button__ instead. You don't even have to login!

###Upvote as Answer
__This is not a forum. If you wish to thank somebody, you should <a href="http://gaming.stackexchange.com/privileges/vote-up">vote him up</a>.__ We require a little bit of <a href="http://gaming.stackexchange.com/faq#reputation">reputation</a> before you can do that to prevent abuse; why don't you get some by <a href="http://gaming.stackexchange.com/unanswered">answering a question?</a>

###Not a Real Question
This is not a forum; __this is a questions and answer site, and I'm afraid your post isn't really a question, because <a href="http://blog.stackoverflow.com/2011/01/real-questions-have-answers/">real questions have answers, not items or ideas or opinions</a>.__ <a href="http://gaming.stackexchange.com/faq">Please read the FAQ for more information.</a>
nanofarad
  • 121
  • 6
badp
  • 955
  • 6
  • 23
12

Can comment text please be collapsed/hidden by default and only expanded for the currently chosen option? This would work kind of like the 'more info' link in the faq which pops out when you click it. (My dialog is getting pretty big now and this would really help!)

Example mockup

As already said by many others - thank you so much for this script!!

Alex Angas
  • 151
  • 1
  • 6
11

I felt limited by only six comments, so I made some small improvements.

Implemented the following features:

Head list items are intended for users, sub list items are intended for developers.

  • Allow the user to enter an unlimited amount of comments. (Add them in import/export)

    • Based the script on the local storage, while using comments only for initial data or to reset.
    • Refactored duplicate code & checks as comments behavior is replaced by localStorage.
       
  • Scrollbar for when the amount of comments exceeds the standard height.

  • Added a link to allow the user to toggle the visibility of descriptions.

    • This is remembered by using the local storage.
       
  • Improved see-through behavior by hiding title and buttons and making it more transparent.

  • Fixed invalid info: "User info detection doesn't work on CW answers, nor with deleted users."

    The box now either shows "This user is not registered." or hides.

  • Fixed greeting consistency, it's now added again after editing comments.

Old version:

Please make sure that both versions do not conflict.

Download Old Version | Source

double-beep
  • 681
  • 4
  • 14
Tamara Wijsman
  • 361
  • 2
  • 10
  • Fixed a bug with incorrectly loading the visibility of descriptions. Works 100% now... :-) – Tamara Wijsman Mar 05 '11 at 21:27
  • Fixed a bug where you were unable to click the option bullet or edit the entry after import/export. – Tamara Wijsman Mar 05 '11 at 21:45
  • Attempted to fix a bug where "Welcome to SITENAME!" was inserted twice, doesn't reoccur... – Tamara Wijsman Mar 05 '11 at 21:46
  • Spotted a bug: In-line editing a greeted comment saves the greeting within the comment. I won't fix this... – Tamara Wijsman Mar 05 '11 at 21:55
  • 2
    Tom, they say imitation is the sincerest form of flattery, so I'll forgive you suggesting people remove my script! :) Not sure if I'll have time to look at this today, but I'll work through your modifications and see whether/how I might integrate them. I think it would be interesting if you could 'export' your comments and paste them here, like @badp did. – Benjol Mar 07 '11 at 07:19
  • Pastebin - Still an early version as I haven't made much auto-comments, but it does the job. Yeah, I don't mean to replace you work, made some improvements to make it more usable to me and thought about sharing the changes. Also, I learned how local storage works in extensions because of you... :-) – Tamara Wijsman Mar 07 '11 at 15:47
  • 3
    @TomWij, V1.0.8 integrates all your modifications (except that I just hide userinfo if I can't find any). – Benjol Mar 17 '11 at 13:30
  • @Benjol: V1.0.8 has a bug re: greeting, opening the dialog a second time prepends a second greeting. – Hasturkun Mar 28 '11 at 17:02
  • @Hasturkan: Oh, it's still there? Can you tell us how to reproduce this? I thought I got it fixed here... – Tamara Wijsman Mar 28 '11 at 17:09
  • @Hasturkan, @Tom. OOps! Must have missed that one. Fixing now... (Another side effect is that if you open the second time on an 'old' user, you still get the greeting) – Benjol Mar 29 '11 at 04:37
9

Doesn't work on superuser.com (only www.superuser.com) because it includes only domains with a period like so:

http://*.superuser.com

and should be

http://*superuser.com
Benjol
  • 1,711
  • 3
  • 13
  • 19
Pylsa
  • 151
  • 4
7

Feedback:

The definitions of the sites are not all-inclusive. For instance, the link doesn't show up on stackapps ;)

Benjol
  • 1,711
  • 3
  • 13
  • 19
jcolebrand
  • 283
  • 1
  • 8
7

Another future idea: expandable groups of comments similar to the way Close>Off-Topic opens a list of sites.

Benjol
  • 1,711
  • 3
  • 13
  • 19
Dennis Williamson
  • 896
  • 1
  • 5
  • 11
  • 1
    Implementation thoughts: See my answer for a local storage based extension. Use a new syntax (eg. ##) that when read is stored as a comment with description "header", then when reading such comment you could embed all subsequent non-header comments and easily have expandable groups. – Tamara Wijsman Mar 04 '11 at 18:19
  • This is how I do this now. Not going to implement this myself because I dislike an extra click... – Tamara Wijsman Mar 04 '11 at 23:23
  • this is [status-completed] if you accept Tom's way of doing things (which I've integrated into my script) – Benjol Mar 27 '11 at 08:13
7

(something equivalent, anyway)

I see a couple of comments here suggesting that Benjol is thinking of making the Welcome message configurable.

This is a formal request for that feature.

On Skeptics.SE, we have a meta-post which is a Welcome to New Users FAQ, and explains some of the ways Skeptics.SE differs from other Stack Exchanges. I have experimentally forked this code, just to make the Welcome message include a link to this meta-post.

Unfortunately, my JavaScript skills are too dodgy to make it customisable and offer it back to you as a patch. (The customisation strikes me as particularly tricky for the troublesome few that moderate multiple Stack Exchanges.)


Suggested presentation:

This is only a suggestion - incorporate it into the existing options file. It is a bit ugly, but I think better than having a whole separate config system.

~~~ This is comment text. This line represents the default.
Welcome, my dearest new friend, to $SITENAME.
[Welcome to Skeptics](http://meta.skeptics.stackexchange.com/questions/1505/welcome-to-new-users)!
</code></pre>
<p>An alternative would be to put it all on one line, but then the [qualifier] notation would conflict with the [link]() notation.</p>
Oddthinking
  • 233
  • 2
  • 6
5

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.

enter image description here

Oliver Salzburg
  • 497
  • 3
  • 14
  • Nice, I'll 'advertise' it above, and consider including it in the next version (if I can work out how to pull/merge!) – Benjol Oct 16 '13 at 04:38
  • 2
    @Benjol The implementation is dirty. If you would want to put this in your version, it could be improved. You can check the diff to see what I did. I had actually forgotten to push my changes :P – Oliver Salzburg Oct 16 '13 at 10:35
4

Small bug: I haven't figured out at which point this happens exactly, but the script seems to be over-enthusiastic adding the "Welcome" prefix:

Welcome to $SITENAME$! Welcome to $SITENAME$! Welcome to $SITENAME$! The code you show is vulnerable to SQL injection. Use the proper sanitation method of your library (like mysql_real_escape_string() for the classic mysql library), or switch to PDO and prepared statements.

Unless you already know what causes this, I'll keep an eye on it and report back.

Benjol
  • 1,711
  • 3
  • 13
  • 19
Pekka
  • 231
  • 1
  • 5
  • I've been using this script for a while, and I've never seen this. Strange. Where did it happen? – Kevin Vermeer Dec 01 '11 at 00:07
  • @Pekka, I'm convinced I never saw this post in my inbox. I only just discovered it now! I corrected this bug a while back, I believe.... – Benjol Mar 29 '12 at 08:21
4

Can you also add the auto link on the flag review page of 10k+ users? Especially when going through the "not an answer" flags there are tons of "thanks" and "question instead of answer" posts.

Update: To get it working, there are only minor changes needed:

  • Enable the script for /tools* on the various sites
  • Add .mod-post-header to the delegate list for the click event:

    $(".question, .answer, #questions, .flag-container, .mod-post-header").delegate(".comments-link", "click", function () {
    
ThiefMaster
  • 260
  • 1
  • 7
3

Future idea: include an 'auto-update' function which polls for new versions and notifies user (with anti-nagging functionality).

Benjol
  • 1,711
  • 3
  • 13
  • 19
3

In GreaseMonkey the Name of the Script is AutoReviewComments but the name of the StackApp is Pro-Forma comments.

This makes it very hard to find the app (once you forgot its name :D).

Maybe those could be named equally?

Benjol
  • 1,711
  • 3
  • 13
  • 19
oers
  • 121
  • 6
3

Can $SITENAME$ be changed for Christianity? Here's what a comment to a new user reads:

Welcome to Christianity! ...

Which sounds pretty creepy. For one thing, most folks who stumble into the site are already affiliated with some faith, which might or might not be Christianity. For another, it sounds like we are a cult or a church. We aren't.

Could $SITENAME$ be changed to "Christianity—Stack Exchange" or "Christianity.SE"?

(I haven't tried to adjust the messages myself, but besides being a bit tedious, it probably would be best to not have new users of the script sending the wrong signals.)

It's less of a concern, but I think it would be odd to see messages like:

Welcome to English! ...

or

Welcome to Parenting! ...


I forked a version and made the following changes at line 67:

if(sitename == "Stack Exchange"){
  sitename = arr[arr.length - 2]; //workaround for SE sites..
  greeting = 'Welcome to ' + sitename + '—Stack Exchange! ';
  sitename = sitename + '.SE';
}

That way, the "Answers just to say Thanks!" comment reads:

Welcome to Christianity—Stack Exchange! 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 Christianity.SE way of saying thank you.

The same comment on SO reads:

Welcome to Stack Overflow! 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 Stack Overflow way of saying thank you.

Jon Ericson
  • 334
  • 2
  • 7
  • Welcome to Stack Apps! 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 Stack Apps way of saying thank you. – Jon Ericson Mar 06 '12 at 21:30
  • 1
    Typically lazy developer's response, how about *%SITENAME%*? – Benjol Mar 07 '12 at 07:13
  • OK, that won't work for the Welcome bit (I'd have to code that up), but would it be a viable alternative? – Benjol Mar 07 '12 at 07:15
  • Welcome to Stack Apps! 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 Stack Apps way of saying thank you. – Benjol Mar 07 '12 at 07:15
  • I'm loath to do more than that, because there's a risk of getting negative feedback from other users who are happy with the current functionality (unfortunately I haven't yet coded a 'feedback' function in this script!). Let me know what you think. – Benjol Mar 07 '12 at 07:37
  • @Benjol: Yes, that would help. In fact, it would clarify some of the other messages, now that I see it in action. ;-) I wonder if it would be possible to add a variable suffix (which would default to the null string) at least for the Welcome portion. (I really do like the work you've done with this. If I have to type a few extra letters once in a while, it will still be a huge win for me.) – Jon Ericson Mar 07 '12 at 16:55
  • Jon, how do you see the variable suffix? Could you give me some examples, and maybe an idea of how/where you'd modify it? – Benjol Mar 08 '12 at 05:50
  • @Benjol: I was thinking of something like: 'Welcome to ' + sitename + sitesuffix + '! ' in the place where you construct the greeting. Then I would want to configure it somehow (I don't really know JavaScript) to set sitesuffix = '—Stack Exchange'. Does that make any sense? – Jon Ericson Mar 08 '12 at 17:15
  • 1
    the way I'm thinking about it right now, I think I'd be tempted to make the whole greeting configurable (there are some people who don't like it). I've got a few other changes in the pipes, so this may take a while. In the meantime, if you want to do a personal hack while you're waiting, you need to track down the user-script file, go to line 66, and replace sitename = arr[arr.length - 2]; with sitename = arr[arr.length - 2] + 'your_suffix_here';. After saving, you'll need to F5 in your browser to see the difference... – Benjol Mar 09 '12 at 06:44
  • @Benjol: Thanks for your help. I'm not sure how widespread the script is outside of SO, but I think my change will help me on other Stack Exchange sites. – Jon Ericson Mar 09 '12 at 20:06
  • 1
    Looks good to me, watch out, I've got a new version coming up, you'll need to rebase your fork :) – Benjol Mar 23 '12 at 14:56
3

Bug: if my comment contains &, when I insert it it will insert &amp; instead.

Preview

enter image description here

Result

enter image description here

Import/Export

enter image description here

Oak
  • 201
  • 1
  • 8
  • I've got a correction for this, I'm just waiting a bit to see if there aren't some other fixes that I can fit into the next version too. – Benjol Jul 03 '12 at 11:16
  • @Benjol am I supposed to do anything for the script to update? Because I still experience the issue. – Oak Jul 17 '12 at 17:46
  • 1
    Oak, the script should check for a new version every day, and send you here to install it. If you've clicked on this link and it's still not working, then yes, there's a problem somewhere. – Benjol Jul 18 '12 at 06:07
  • 1
    @Benjol right, my bad. Reinstalled and it's now fixed :) – Oak Jul 18 '12 at 06:16
3

Request: I see a lot of newbies post a comment saying "Thanks this worked perfect for me. It's exactly what I need" on an answer to their question, yet they do not mark the answer as accepted. [username] plugs in the username of the answerer when posting on an answer, but it would be helpful to also include an [OPusername] (or something to that effect) to be able to @ the original question asker on a specific answer.

i.e.

"If this answer is helpful to you, [OPusername], then please consider marking it as the accepted answer so others may more easily find it in the future. This is also a polite way to thank the person answering your question for helping you out."

Benjol
  • 1,711
  • 3
  • 13
  • 19
Gaffi
  • 101
  • 4
  • 2
    Implemented, but using [OP] instead of [OPusername] – Benjol Nov 01 '12 at 06:38
  • 1
    @Benjol The current [OP] implementation copies the user's name directly. Could you maybe add another one which adds it in a way usable as a @ tag (e.g.: [@OP])? – kiri Feb 14 '14 at 11:00
2

@Benjol You could add the extra set of comments that I use in-tandem with Phrase Express:


@<username> Please don’t use signatures or taglines in your posts. Every post you make is already "signed" with your standard user card, which links directly back to your user page


Shopping questions are off-topic as per the FAQ: it is not about a shopping or buying recommendation


Sathyajith Bhat
  • 455
  • 3
  • 13
2

Can you add multiple pages of comments? Currently if you have a lot of auto comments, you have to scroll to see them, but it would be nice to be able to click next and previous to see lists of about 5 comments.

Also, the "see through" feature is cool, but it should be activated by a click, instead of on mouse over.

One more problem: Importing the comments seems not to save them.

Benjol
  • 1,711
  • 3
  • 13
  • 19
RolandiXor
  • 151
  • 5
  • Thanks for the feedback. Have you tried the show/hide description option? That should give you more room for seeing your comments without scrolling. Concerning importing the comments, they should save, but only on the current site. I haven't got cross-site sharing working yet. Maybe local storage is not blocked for you? – Benjol Sep 18 '11 at 11:13
  • @Benjol the import didn't work even on the site that I imported on :(. Local storage is available (using Firefox 9). – RolandiXor Sep 18 '11 at 12:54
  • and how about 'normal' edits (double click on a title/description)? – Benjol Sep 19 '11 at 13:20
  • 1
    Hang on, is that Firefox 9 an upside-down six?! – Benjol Sep 19 '11 at 13:32
  • @Benjol I didn't know about that before. – RolandiXor Sep 19 '11 at 13:32
  • 1
    @Benjol nope; it's Firefox 9. I am from the future. You will have a good day tomorrow :). P.S. it works editing existing ones. – RolandiXor Sep 19 '11 at 13:41
2

Here's a bug report.

I've attempted to add the following comment:

[**Please, don't use `mysql_*` functions in new code**](http://bit.ly/phpmsql). They are no longer maintained and the [deprecation process](http://j.mp/Rj2iVR) has begun on it. 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).

Which should render like so:

Please, don't use mysql_* functions in new code. They are no longer maintained and the deprecation process has begun on it. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.

Instead, right after saving, it renders to

[**Please, don't use `mysql_*` functions in new code***](http://bit.ly/phpmsql)*. They are no longer maintained and the [deprecation process](http://j.mp/Rj2iVR) has begun on it. See the [**red box**](http://j.mp/Te9zIL)? Learn about [</a>*<a href="http://j.mp/T9hLWi">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).

Which renders as

Please, don't use mysql_* functions in new code*. They are no longer maintained and the deprecation process has begun on it. See the red box? Learn about prepared statements* instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial.

I suspect the asterisks are derailing it, but why should it care about it anyway? Does it attempt to also fix the comment before saving?


Edit

Seems like the Comment's markdown is parsed into HTML and then remapped to Markdown (why?!). Using's Chrome's console and editing the localStorage directly with

<a href="http://bit.ly/phpmsql"><strong>Please, don't use <code>mysql_*</code> functions in new code</strong></a>. They are no longer maintained and the <a href="http://j.mp/Rj2iVR">deprecation process</a> has begun on it. See the <a href="http://j.mp/Te9zIL"><strong>red box</strong></a>? Learn about <a href="http://j.mp/T9hLWi"><em>prepared statements</em></a> instead, and use <a href="http://php.net/pdo">PDO</a> or <a href="http://php.net/mysqli">MySQLi</a> - <a href="http://j.mp/QEx8IB">this article</a> will help you decide which. If you choose PDO, <a href="http://j.mp/PoWehJ">here is a good tutorial</a>.

Appears to fix the problem.

double-beep
  • 681
  • 4
  • 14
Madara's Ghost
  • 311
  • 1
  • 11
  • 1
    The answer to the 'why' bit is that I display the HTML in the popup. As to the fix... I'll look into it. – Benjol Oct 25 '12 at 04:55
  • @Benjol wouldn't it make more sense to store the Markdown version as well? (Or at least implement a more robust HTML parser)? – Madara's Ghost Oct 25 '12 at 08:48
  • 1
    to be honest, I can't remember when or why I decided to store it as HTML. Whatever, I've got a pseudo-correction in the works (very pseudo, it skips transformations of * and ** if it finds a backtick in the middle). – Benjol Oct 25 '12 at 08:54
  • @Benjol it seems as if the bug still persists! Even after updating to the latest version! – Madara's Ghost Nov 07 '12 at 17:32
  • Oh dear, you're right. I was sure it worked. Maybe I broke my correction, or didn't test it properly... – Benjol Nov 08 '12 at 05:44
  • OK, I've tracked it down, but I'd like to wait a bit before doing a new version (in case new bugs crop up). If you want to correct this locally, go to line 343 and replace the first [^`] with .. – Benjol Nov 08 '12 at 06:24
  • Alright, you should really consider packing it and shipping it over at the Chrome Market. It allows you to do stuff like push updates automatically etc etc. – Madara's Ghost Nov 08 '12 at 18:06
  • yes, maybe. At first glance it looks like a lot of administrative gumph. If I read correctly, I have to pay $5 upfront for something that I'm intending to give away? Or am I not looking in the right place? – Benjol Nov 09 '12 at 05:37
  • @Benjol: Also, I've notice your extract function works the same (HTML vs Markdown wise), shouldn't it be presented in markdown rather than HTML? It would be lighter in file-size, and much closer to the intended result. – Madara's Ghost Jan 24 '13 at 09:20
2

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.

Izzy
  • 101
  • 5
2

It would be nice to have a place other than in these answers for us to share setups. Could you provide one and link it to the main post?

I thought about posting another question to deal with this, but wasn't sure if it belonged in stackapps or meta.stackapps.

virtualxtc
  • 103
  • 4
  • Or meta Stack Overflow? Depends on whether you think there are standard cross-site messages. Some users seem to prefer to tailor their comments for specific sites. And, that aside, I think it is probably preferable for each person to craft their own, because that avoids the appearance of 'robo-commenting' - which seems to be the main fear that prevents this script being integrated into SE. – Benjol Jan 09 '14 at 06:24
  • On reflexion, I think this should be done per site on their own meta. @Izzy did this very recently on SR – Benjol Feb 27 '14 at 06:19
  • @Benjol if a robot can comment, then the comment should appear before the user can submit their post; However if everyone were to use and revise the "preferred language" I would think that would only add clarity as to what action needs to be taken and why. – virtualxtc Feb 28 '14 at 08:26
  • @Benjol, site specific sets should also be kept; but given that most new users run into problems with the general SE format, I'd suspect there's still plenty of room for a pan-site list. – virtualxtc Feb 28 '14 at 08:28
  • 1
    see here: https://github.com/Benjol/SE-AutoReviewComments/issues/6 – Benjol Mar 03 '14 at 10:03
  • @Benjol that would work for me! – virtualxtc Mar 03 '14 at 11:24
2

I cleared my cookies yesterday, and lost all my saved comments. Is there any way to get them back?

I just tried restoring my cookies from a backup, it didn't help. Then I tried restoring my entire ~/Library/Application Defaults/Chrome/Default folder, it seemed to cause other problems (Chrome warned that it didn't shut down cleanly), and also didn't restore my auto-comments.

Where are the auto comments stored, maybe I can find that and manually copy them.

Barmar
  • 101
  • 4
1

Somehow, it doesn't show the "auto" link any more here... re-installed already. FF 4.0.1 using latest version of Greasemonkey.

double-beep
  • 681
  • 4
  • 14
Pylsa
  • 151
  • 4
  • That's a shame. I can reproduce, looking for bug/fix now. Can't reproduce in Chrome, so it looks like it's a firefox/gm thing, not a change in SE markup... – Benjol May 11 '11 at 04:45
  • OK, I've tracked something down, but no idea what the root cause is. If you add an alert('anything'); at line 414 (before adding handlers to click on the comment links, it works, as long as you don't dismiss the alert immediately. Must be some kind of timing issue. If anyone has any ideas... – Benjol May 11 '11 at 05:31
  • In full.js, this looks like the guilty candidate: $("a[id^='comments-link-']").unbind("click") – Benjol May 11 '11 at 05:42
  • 1
    Fixed this in V1.1.0 – Benjol May 11 '11 at 07:45
1

There appears to be a bug with the [edit] magic link.

Using this text:

###Question needs more information
We need more information to answer
your question. Please [edit] your post and add details as requested by
the community. It will be closed for now, but don't worry - once you
have improved the question flag a moderator and it can be reopened.
See [How do I ask questions here?](http://$SITEURL$/faq#howtoask) for
general guidelines.

Gives a broken preview:

enter image description here

The comment still inserts OK however.

Alex Angas
  • 151
  • 1
  • 6
1

Since you're fetching user info from the userpage, could you add in something to show whether the user is registered or not?

Benjol
  • 1,711
  • 3
  • 13
  • 19
waiwai933
  • 141
  • 3
1

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.

Benjol
  • 1,711
  • 3
  • 13
  • 19
oers
  • 121
  • 6
  • Nice idea... could be a bit of a bummer to implement, and to work out the interface, but... I'll think about it. How do you see the edition/definition bit working? – Benjol Dec 01 '11 at 10:21
  • yeah that might be complex to make it user friendly. My first idea was something like : ### --> BOTH (current beginning of definiton), $$$ --> Answers, %%% --> Questions. – oers Dec 01 '11 at 10:27
  • Implemented, see my edited question for details. – Benjol Dec 01 '11 at 12:46
  • @Benjol if you click the import/export link you will only see the currently selected questions. And is the format [Q]###Text? – oers Dec 01 '11 at 13:12
  • @Benjol okay I did it wrong :D Format is ###[Q]Text :) The other way round just destroyed my settings ;). But if you click import/export the import/export window is only as large as the last box. Which may be very small, if no selectable Comment was displayed. – oers Dec 01 '11 at 13:18
  • whoops! Sorry. I only tested it by direct double-click edits. Didn't think to specify for import/export. I'll see what I can do about minimum height for import/export window... – Benjol Dec 01 '11 at 13:21
1

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?

Benjol
  • 1,711
  • 3
  • 13
  • 19
RolandiXor
  • 151
  • 5
  • 1
    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 08 '11 at 14:48
  • @Benjol yes I do lose them every time :( – RolandiXor Dec 08 '11 at 15:21
  • I really don't understand how that can happen. If I look at the code, the only two places where I reset comment is if you hit the Reset button, or if the script doesn't find any comments there... Another thing you could try is installing the beta global-storage version (see last comments on my question above), this would mean you can 'push' your custom comments to global before updating, then 'pull' them down afterwards if they go missing. – Benjol Dec 09 '11 at 05:42
  • Strange... I don't lose my comments when I update. – Kit Menke Jan 09 '12 at 15:18
  • 1
    Note that you can now save your comments to a file, read here. – Benjol Apr 11 '12 at 12:14
1

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.
Benjol
  • 1,711
  • 3
  • 13
  • 19
ThiefMaster
  • 260
  • 1
  • 7
  • Wow, nice catch! Weird, because it's stored ok (as you can see if you re-open import/export). I'll look into it. – Benjol Feb 24 '12 at 12:02
  • 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. – Benjol Feb 24 '12 at 12:45
1

(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; https://stackoverflow.com/questions/9729546/jquery-script-being-executed-before-all-each-has-completed is one where it does happen though.

ThiefMaster
  • 260
  • 1
  • 7
  • 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. – Benjol Mar 16 '12 at 05:58
  • Would be great if that didn't happen if the welcome message plus the custom message exceeded the maximum length. – ThiefMaster Mar 16 '12 at 06:22
  • Goodness! I'd imagine that if you want any hope that the user will actually read your comment, you'd need to be well short of the max length... I'm currently toying with the idea of making that prefix configurable, so you may yet get your wish... – Benjol Mar 16 '12 at 06:48
  • thanks for the option to remove the welcome message, I used to remove manually everytime. It doesn't seem to be working correctly though - more specifically, edit the welcome message to none, save, reload & the the welcome message is still retained – Sathyajith Bhat Jan 20 '13 at 04:53
1

The same way we press Esc to close the list can we have Enter to add the comment directly instead of the button bellow the list?

My list is getting a bit big and every time I need to select a comment (in a small laptop screen mind you) I need to scroll to the comment, click, scroll down to the end, click to add the comment and the scroll back up on the page to where I was before.

Can this be fixed so Enter adds the comment directly without needing to scroll all the way down?

Benjol
  • 1,711
  • 3
  • 13
  • 19
1

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

tshepang
  • 103
  • 5
Martin Scharrer
  • 161
  • 1
  • 5
1

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.

Benjol
  • 1,711
  • 3
  • 13
  • 19
daviesgeek
  • 165
  • 7
  • Hm, it's an idea. I'm not sure about the execution though. The problem is that the user name is retrieved asynchronously, so dynamically updating the descriptions as you see them in the popup would be... not hard, but work. Alternatively, I could do the replace on insertion, but that might confuse some people. Conclusion: I'm thinking about it. Right now. – Benjol Jul 03 '12 at 05:10
  • @Benjol Awesome! Haven't tried it out yet, but thanks!!! – daviesgeek Jul 06 '12 at 05:35
1

It seems like it isn't compatible with the new review system.

enter image description here

Oliver Salzburg
  • 497
  • 3
  • 14
1

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).
Benjol
  • 1,711
  • 3
  • 13
  • 19
ThiefMaster
  • 260
  • 1
  • 7
1

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.

Benjol
  • 1,711
  • 3
  • 13
  • 19
Martijn Pieters
  • 901
  • 7
  • 17
1

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

  • Yeah, weird, on that particular question I'm guessing (haven't checked the code) it's because the <TITLE> of the page doesn't include a tag. I'm not sure how I would distinguish the 'branded' from 'not branded' sites, but I see what you mean. Maybe I should just go for StackExchange everywhere... – Benjol Jan 09 '13 at 06:13
  • I don't have an account on Computer Science, but I did a console.log there and can't reproduce it. Have you got another script that's messing with the <TITLE>? – Benjol Jan 09 '13 at 06:26
  • @Benjol Ah, I see. I do have StackExchange Title Tag Remover. If you're scraping the page title, that would explain it. Consider this to be a feature request to put “Stack Exchange” everywhere — even when the scraping works, “the Unix & Linux way of saying thank you” or “Welcome to Mathematics!” rings poorly. – Gilles 'SO- stop being evil' Jan 09 '13 at 10:48
1

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"
Cody Guldner
  • 133
  • 12
1

(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 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. 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 button.

###6
If you have a NEW question, please ask it by clicking the Ask Question button. If you have sufficient reputation, you may upvote 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.

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

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

###12 If you have enough reputation to participate in Meta (that is 5 rep), you can try formatting at the 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.

  • Could you paste whatever it is you're trying to 'import' here in your answer? I can't reproduce the A & Q problem (though I admit I'm using Firefox) – Benjol Sep 23 '13 at 04:37
  • @Benjol: Ok, added it in. –  Sep 23 '13 at 17:19
  • I'm sorry, but short of installing the beta of Chrome (which I don't really want to do), I don't seem to be able to help you (the current version seems to work ok for what you posted above). Ping me again once this version gets released (and if it still doesn't work). – Benjol Sep 24 '13 at 04:42
  • @Benjol Yes, I have installed the current version (1.2.9). –  Sep 24 '13 at 05:18
  • Sorry, I meant the version of Chrome, not the extension :) – Benjol Sep 24 '13 at 09:44
  • I just retested, and actually got round to reading your comments. Sorry, but I downvoted because these are the kinds of comments which give the extension a bad name. – Benjol Dec 04 '13 at 05:52
  • @Benjol: No, the comments are nice, only the headings are angry. But ok, fixed. –  Dec 04 '13 at 11:17
  • ok, that detail escaped me :) I still can't reproduce your problem though. Is it a variant of this one? – Benjol Dec 04 '13 at 11:24
  • @Benjol Hm, yes, I think that's the problem. I do have a tendency to add a lot of spaces. –  Dec 04 '13 at 13:34
1

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!

Benjol
  • 1,711
  • 3
  • 13
  • 19
Lord_Farin
  • 101
  • 3
  • To be precise, the bug should be fixed, but I haven't yet put any thought into the adding new comments request. – Benjol Feb 12 '14 at 08:15
1

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

Caleb
  • 300
  • 4
  • 10
Izzy
  • 101
  • 5
  • Nice to see someone else getting involved with the heavy lifting :) That Pastebin link shows empty for me though. – Benjol Feb 24 '14 at 07:21
  • Yuck Is there any other place I could put it for you? I tried a few other pastebins, but they proved unreliable (e.g. cut off trailing \ and thus broke the script). I've put it to pastebin.com just now in the hope it stays ("expiration: never"). // Btw: I didn't play with the "remote location". But if that just wraps around the Import/Export, it should be fine as well. – Izzy Feb 24 '14 at 07:32
  • ok. Got it. Can't promise I'll be looking at it in the very near future, but at least I have it and can check it out some time. – Benjol Feb 24 '14 at 13:00
  • @Benjol Great, thanks! Would be glad to see it merged "back". If you got any questions, just ping me on chat (I'm usually logged in 24/7 at Android and Software-Recommendations). Ah, and you probably can ignore the different "default-answers", except for the "extended syntax" (optional Site: element, optional $MYUSERID$ placeholder). // As to the original PasteBin: Looks like I missed increasing "expiry" from "1day" to "forever" #) – Izzy Feb 24 '14 at 13:10
  • @Izzy I'm perfectly willing to do this for you, but it's frightfully easy. Just hit up the gist page, hit the fork link, then hit the "edit" button for your copy and use the web based editor to paste in your version of the file and save. Then post the link. Seriously you don't need to learn GIT to do this (even if you should do that anyway). – Caleb Feb 25 '14 at 10:22
  • 1
    @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
  • OK, I'm not sure whether I know how to merge that without you sending a pull request. @Caleb, if you're really motivated, there's a couple of other pending suggestions/requests: getting it working for chrome, and splitting into sub-files (i.e. moving from gist to Github proper)... :) – Benjol Feb 25 '14 at 11:10
  • OK, I can do it without a pull request. Looking now... – Benjol Feb 25 '14 at 11:16
  • @Benjol I don't know how to do that (I'm not used to Git). But Caleb already forked my fork, so he's probably coming back with a bunch of countrymen soon :) – Izzy Feb 25 '14 at 11:17
  • @Benjol Izzy is new to git, but you can merge changes the same way you would with any git repo. Gists are full repos so you can git remote add rematename <other gist url> then use the normal collection such as git pull to merge changes form other gists into your branch of choice. But I agree this userscript could benefit from being a normal repo instead of a gist, it's kind of outgrown itself. – Caleb Feb 25 '14 at 11:28
  • @Caleb, my problem is I've always had problems (network and my understanding) connecting to github, so most of what I've done has been copy/paste from the web interface. So merging is a challenge... – Benjol Feb 25 '14 at 11:36
  • @Benjol In that case, I'd recommend to 1) use a graphical compare tool (WinDiff on Win, FLDiff on *nix) to check the differences. Then you 2) will most likely end-up simply taking my copy while 3) replacing the defaultComments I've changed, and 4) be done :) – Izzy Feb 25 '14 at 11:41
  • @Benjol I've made a full repo with your gist history and am going to make a branch that includes Izzy's changes. – Caleb Feb 25 '14 at 11:45
  • @Caleb, ok, sounds good, I'll try from home later on maybe. – Benjol Feb 25 '14 at 11:56
  • Re-located (Caleb did a good job at re-organizing everything for easier handling). My feature branch now is here, and whoever is interested in the "early bird" can install from here. Or wait until it gets merged upstream :) – Izzy Feb 27 '14 at 00:26
1

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.

Benjol
  • 1,711
  • 3
  • 13
  • 19
bmdixon
  • 101
  • 2
1

Stack Exchange just switched all sites from HTTP to HTTPS, and now none of my saved messages are showing up. Is there a way to migrate all the saved comments from the HTTP URLs to HTTPS?

Barmar
  • 101
  • 4
  • Arraghg! That's really a bummer. Do you have a github login? You should add an issue here:https://github.com/Benjol/SE-AutoReviewComments and we'll see what we can do... – Benjol May 23 '17 at 04:52
  • 1
    Issue #134 open. – Barmar May 23 '17 at 05:14
1

One of the standard comments reads

If you have a NEW question, please ask it by clicking the Ask Question button. If you have sufficient reputation, you may upvote the question. Alternatively, "star" it as a favorite and you will be notified of any new answers.

The new Follow Questions feature is better suited for this kind of "me too" posts than favoriting, since it generates inbox notifications. Can this standard comment be adjusted to mention the follow feature instead?

Glorfindel
  • 6,772
  • 3
  • 20
  • 46
0

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.

Zoredache
  • 101
  • 3
0

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.

See also What should I do when I see copyright violations posted on Stack Overflow? and Should moderators enforce NDAs for software vendors?

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

double-beep
  • 681
  • 4
  • 14
Kevin Vermeer
  • 251
  • 2
  • 6
  • 1
    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 06 '11 at 18:07
  • It is for me and some other mods - Maybe not so much for normal users. I'll revise to suggest it as a possible addition to an existing set. – Kevin Vermeer Dec 06 '11 at 18:18
  • yeah, I prefer that. In fact it might be worth a question on meta - "proposed canned comment lists". I tried to start something like that here, but maybe it's not the best place. If people used the format proposed here, it would make importing/exporting easier. BTW, just in case your interested, there's a beta (or alpha) of a global storage version (see last comments on the question here) – Benjol Dec 06 '11 at 19:52
  • @Benjol - Oooh, global storage would be nice. Even nicer would be a method to sync between my laptop and my desktop. What if you allowed the user to set a URL to pull from, such as a Github head or uploaded file? – Kevin Vermeer Dec 06 '11 at 19:58
  • Well I guess that's what I'm working towards. To be honest I'm hoping that at some stage the team will pick this up, and then they global storage part becomes their problem! But your idea isn't bad... – Benjol Dec 07 '11 at 05:37
  • Some feedback on this comment thread: http://meta.stackoverflow.com/questions/117963/formal-adoption-of-pro-forma-comments-script-into-se-engine-proper – Benjol Jan 05 '12 at 14:33
  • your comment is status-completed :) – Benjol Jul 06 '12 at 05:19
0

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"
double-beep
  • 681
  • 4
  • 14
cdeszaq
  • 101
  • 2
0

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.

double-beep
  • 681
  • 4
  • 14
Martin Scharrer
  • 161
  • 1
  • 5
0

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.

Benjol
  • 1,711
  • 3
  • 13
  • 19
daviesgeek
  • 165
  • 7
0

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)

double-beep
  • 681
  • 4
  • 14
Oddthinking
  • 233
  • 2
  • 6
0

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?

double-beep
  • 681
  • 4
  • 14
  • No idea. The script uses localstorage, have you got some add-on or extension which clears local storage every time you shutdown FFx? – Benjol Feb 26 '13 at 07:10
0

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

double-beep
  • 681
  • 4
  • 14
Oddthinking
  • 233
  • 2
  • 6
0

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

0

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

double-beep
  • 681
  • 4
  • 14
ComFreek
  • 101
  • 2