Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


This userscript automatically converts raw Stack Exchange question URLs into the form [title](link) before submitting comments by grabbing their titles from the API. This is similar to conversion done natively on posts, and is in response to this Meta request. The script also tries to shorten links where appropriate, stripping out unnecessary URL content to conserve comment characters.

More information can be found in the SECommentLinkHelper section of the README.


Install / Update the script   (See the script tag-wiki for installation help.)
View the source


  • 2012-12-08: Thanks to feedback from doncherry, various parsing issues are now corrected. Of note is inclusion of proper support for conversion of comment links and /a/### short-form links.
  • 2014-01-05: The scrpt will now run under HTTPS, and will correctly handle HTTPS links.


The script should work under all major userscript-supporting browsers. Please file a bug if you encounter any issues.


Tim Stone actively maintains this script.

Feedback can be given on GitHub, or by "@lerting" the maintainer on Meta Stack Exchange chat.


To fork the code, please visit the GitHub repository.

share|improve this question
Note: The script doesn't use an API key at the moment, so I'll need to fix that in the near future. – Tim Stone May 1 '11 at 18:03
There is no information about this at that README link. – Fred Nurk May 21 '11 at 6:16
@FredNurk Ah, I forgot to regenerate the HTML from the actual README document. Sorry about that, I'll make sure that gets updated later this evening. – Tim Stone May 23 '11 at 22:41
@TimStone: Love the script! Could you implement an option to append the urls with one's user account number so that links contribute towards the Announcer etc. badges? So instead of having, it'd be (4746 being your user account number for stackapps). – doncherry Jul 10 '12 at 20:02
@doncherry Thanks! You don't receive credit if the link was clicked inside of the Stack Exchange network anyway (as would be the case with comments), which is why it removes the referral slug. – Tim Stone Jul 11 '12 at 19:53
@TimStone: I didn't know that! Then my proposal is void, of course. Thanks for letting me know. – doncherry Jul 11 '12 at 20:43
Since today (I think), this doesn't work for me any more: I've been using Chrome 20.0.1132.57 for weeks, it used to work in this exact browser version. Is there anything I can do to trace why links in comments are no longer prettified? – Gilles Jul 25 '12 at 23:22
@Gilles seems to still be working for me, so I don't suspect anything changed on the sites...Are there are any error messages in the console? It looks like I never got around to registering for an API key for this script (I've now made a note to do so), so there's a very small chance you've exceeded the anonymous API quota somehow, I suppose. – Tim Stone Jul 25 '12 at 23:31
@Gilles Oh, and if you have SE Modifications -- Username autocomplete in comments, inline revision source, and utility links installed, it was causing an error as a result of this change that may impact the setup for this script. I've patched that issue now, so be sure to update to the latest version if applicable. – Tim Stone Jul 25 '12 at 23:34
@TimStone I do have SE modifications. Updating Comment Link AutoPrettifier to the version you just uploaded makes it work. Thanks! – Gilles Jul 25 '12 at 23:39
@TimStone The script hasn't been working for several weeks, if not months. I'm using Firefox 17 on Win, and I just reinstalled the script. Is this expected? Can I provide any more helpful information? (Also, it is confusing that the titles of this StackApp and of the UserScript don't match.) – doncherry Nov 26 '12 at 20:32
@doncherry Hmm, I haven't had any issue in Chrome, but let me check Firefox and get back to you if I need more info. As far as the title goes, I'll take care of that, sorry about the confusion! – Tim Stone Nov 26 '12 at 20:38
@doncherry Ah...apparently this is an issue with Firefox and jQuery's handling of a change I made two months ago that neither side seems inclined to fix. Looks like I can work around it, so I'll do that when I get home today. Sorry for the inconvenience, and I'll make sure that next time I test thoroughly in Firefox. – Tim Stone Nov 26 '12 at 21:11
@TimStone No problem, I'm glad it'll be working again, thanks for your work! – doncherry Nov 26 '12 at 21:36
@MartinSchröder HTTPS isn't officially supported by the Stack Exchange network yet, but I've updated the script to work with it now regardless. Thanks for pointing that out! – Tim Stone Jan 5 '14 at 15:39

When you post a link in inline code, like

The URL ``

the link is rendered as

The URL `[What is the SoC on the ARM9 board TS-7800?]( )`

What should happen is that any URL in inline code should be ignored.

Additionally, links like []( should use the text as the name of the URL, rather than adding another layer of Markdown.

Accidentally published this on MSO here, I've gotten so used to this script that I thought it was native until I had to do this admittedly unusual task.

share|improve this answer
Both cases should be fixed now, let me know if you encounter any more issues. (update link) – Tim Stone Jun 9 '12 at 15:52
Example: The URL,, What is the SoC on the ARM9 board TS-7800? – Tim Stone Jun 9 '12 at 15:53

Bug report: this script doesn't work

I was in the first posts review queue. I made an edit then attempted to leave a comment.

I saw my browser being redirected to for a few seconds, then was brought back to . Reloading the page, or opening in a different tab, caused the same behavior. My comment wasn't posted.

I tried with the latest version of the code fresh from as of a few minutes ago. After disabling this extension, or if I removed the naked URL to another post on the same site, I could post the comment.

Browser: Chrome stable 21.0.1180.89

share|improve this answer
Hmm, interesting. Looking into it. – Tim Stone Sep 23 '12 at 1:37
Patents doesn't have a legacy API, so the script broke there. I've updated the script to use API 2.1, which should fix the problem. Let me know if you continue to experience issues after updating. – Tim Stone Sep 23 '12 at 3:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .