JavaScript version of detexify