add pagefooter, to collect JS for end of page