SOFU links pasted into questions get automatically replaced by the question title. This has been this way for some time now, and it's great.

However, it is missing from comments. This is very annoying, but apparently by design, although I don't really understand why.

Anyway, seeing as this is probably unlikely to change - does a Greasemonkey or user script exist that emulates the behaviour? Meaning that if I attempt to post a comment with a raw SOFU link in it, the script automatically looks up the question title, and replaces the link, before it gets submitted.

(If it's possible at all to do this - I have no idea whether an Ajax question title lookup is doable....)


I wrote a script for this purpose. Please see this StackApps posting for more information.

  • Brilliant, thanks very much! I will look into this later today.
    – Pekka
    Apr 30 '11 at 16:47
  • Very nice, works like a charm. Thanks!
    – Pekka
    May 1 '11 at 17:33
  • one more report, I cannot paste deleted post link anymore - probably getting error and comment does not get submitted.
    – YOU
    May 2 '11 at 12:43
  • @YOU Ah, good catch, this should be fixed now (it'll just leave the link as-is)
    – Tim Stone
    May 2 '11 at 15:20
  • Nice, its working now. Thanks again.
    – YOU
    May 2 '11 at 15:23

As a workaround, George Edison was kind enough to write Copy Question Link Markdown - Making it easier to copy links to questions! This script adds a copy button to questions, which generates markdown with the link and question title, e.g. [Userscript to auto-replace SOFU links in comments?](http://meta.stackexchange.com/questions/89378/userscript-to-auto-replace-sofu-links-in-comments).

Note that both the link text and the description text will count against the comment length limit. You may want to trim the URL down to http://meta.stackexchange.com/q/89378.

  • Excellent, this is a big step already!
    – Pekka
    Apr 30 '11 at 15:56
  • @Pekka: That's a great idea for my script (trimming the length of the generated URL). Apr 30 '11 at 19:10

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