# 回复按钮自定义行为

**URL:** https://meta.discourse.org/t/reply-button-custom-behavior/117960
**Category:** Development
**Created:** [2019年五月16日 20:39 UTC](https://meta.discourse.org/t/reply-button-custom-behavior/117960 "2019-05-16T20:39:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![eatcodetravel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eatcodetravel/32/94385_2.png) [@eatcodetravel](https://meta.discourse.org/u/eatcodetravel)
#### Post date: [2019年五月16日 20:39 UTC](https://meta.discourse.org/t/reply-button-custom-behavior/117960/1 "2019-05-16T20:39:16Z")

</div>

I would like to customize the behavior of the Reply button, like passing extra classes or data attributes (for a popover).

I think I’ve narrowed that functionality to this function [https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/widgets/post-menu.js.es6#L226](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/widgets/post-menu.js.es6#L226).

I’m overriding the whole file and extending the function above with what I want, but I don’t like the idea of keeping this file synced with master. Is there a better way to do this?

Thanks!
