added a simple js decoder; todo: test