Remove JS hacks from Sample