modify ft javascript to js