I don't know which code fragment you are trying to inject, but I assume you have already included a link to a javascript script in your header (you can also include it in your footer instead) and now you need to add the html element of the button that triggers this script.
If you want to show something only in the topics page, then you should change the styles/your_style/template/viewtopic_body.html
file. You can choose where to insert it and, depending on your style and the place, you may need to do some small modifications (e.g. using the inline style=""
attribute).
If you want to show it on the footer of each post, you can try putting your element just before or after the line <!-- EVENT viewtopic_body_postrow_post_after -->
in your viewtopic_body.html
file. The events are like "interesting points" in the styles and you can see a list of them here.
In any case, make sure that you don't make any syntax errors (and always keep a backup). You can validate your page using the W3C validator.