Add a DataviewJS block at the end of every note after rendering

First: I am only self-taught at scripting - so be nice. :smiley:

I currently have at the bottom of all my notes a DataviewJS script that looks similar to this which executes specific queries for me and adds them at the end of the note:

dv.view("Templates/Includes/Bottom");

I now want to use the CustomJS plugin to execute JS code in order to write a little class that enables me to skip this step and just put this line rendered at the end of the file.

This would make things easier for me because I would get rid of this additional line and could change file behaviour centralized.

Can anybody help me out here? I already tried to feed GPT the MarkdownPostprocessor documentation and asked for help. It turned out badly… :smiley: