Reverting html -> javascript in scripts