Yes that is one simple way to do it.
The preferred way would be to use a custom theme or plugin. So rather than having the elements on the page and hiding them with JS, they are not put there in the first place. It's a bit more complex but take a look at the theme docs for help.
Welcome to the Q&A site for Question2Answer.
If you have a question about Q2A, please ask here, in English.
To report a bug, please create a new issue on Github or ask a question here with the bug tag.
If you just want to try Q2A, please use the demo site.
April 20, 2021: Q2A 1.8.6 released!