Fix ads so that it is pure javascript.