Firstly, read the plugin creation guideline: http://docs.question2answer.org/plugins/tutorial/
Then, read the layers documentation: http://docs.question2answer.org/plugins/layers/
You just need to override the body_footer function or, even better, just set the layer's content array for the key 'body_footer'. E.G.:
if (!isset($this->content['body_footer'])) { $this->content['body_footer'] = ''; } $this->content['body_footer'] .= '<script> ... </script>';
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.