public script javascript