Basic javascript worker