# Reply button custom behavior

**URL:** <https://meta.discourse.org/t/reply-button-custom-behavior/117960>\
**Category:** Development\
**Created:** [May 16, 2019, 8:39pm UTC](https://meta.discourse.org/t/reply-button-custom-behavior/117960 "2019-05-16T20:39:16Z")\
**Posts on this page:** 1\
**Page:** 1

## AI-generated summary

In the Development category, user [eatcodetravel](/t/-/117960/1) seeks a better method to customize the Reply button's behavior, such as adding extra classes or data attributes for a popover. The user identified the relevant function in `post-menu.js.es6` but dislikes the current workaround of overriding and manually syncing the entire file with the master branch. They are requesting a more maintainable solution to extend this functionality without full file overrides.

<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:** [May 16, 2019, 8:39pm 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!
