fix js's mobile redirect code