Javascript-based speedtest script