Unifying page-specific Javascript