This is probably easiest in a custom theme. If you don't already have a theme, copy the "Default" folder in qa-theme then create a file qa-theme.php with this content:
<?php
class qa_html_theme extends qa_html_theme_base
{
function footer()
{
parent::footer();
// your code here
}
}