use js to extract header and footer module