a js version of fbtext