Hand rolled some target javascript