(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.

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

Can you suggest better solution to make them work together?