(Superseded) Plugin tutorial #3 - How to add a button after every post?

Hi, thank you for tutorial. I have a question about it. As i understand some time ago there were changes in Discourse, which brought incompatibility with current source code.

I’ve made some changes, and seems all works fine.

https://github.com/woto/discourse-hide-post/commit/289968daade123813cc1a4588cbcb3849e629898

But when i added another plugin which use same technique then i found problems with event triggering.

https://github.com/woto/Solved-Button/commit/2244245c0517f26c35ed452644f1ccf7ac710ece

Can you suggest better solution to make them work together?