refactor footer js buttons