Updated secure JavaScript