3

Automatically add OP's name in comments on StackExchange sites

Converts [user] in a comment to be posted to the OP's username. Originally created to allow comment snippets with [user] included to be copy-pasted.

Installation

Developed & tested with TamperMonkey on Chrome.

Zach Saucier
  • 135
  • 4

3 Answers3

2

Should probably exclude chat so that it isn't running unnecessarily.

Zach Saucier
  • 135
  • 4
Welz
  • 233
  • 1
  • 2
  • 7
2

When pasting into an answer, it'll take the name of the OP on the question, not the answerer.

GIF

Welz
  • 233
  • 1
  • 2
  • 7
  • This was actually intended, but I will change the behavior when I find some time – Zach Saucier Oct 23 '18 at 12:05
  • I edited the code so if you put "user" it says the name on the post you are commenting and if you put "USER" it will put the OP's. – lois6b Oct 24 '18 at 14:48
1

It doesn't take into account the International SO sites.

Should add:

// @match        https://*.stackoverflow.com/*
Zach Saucier
  • 135
  • 4
lois6b
  • 171
  • 6