If you absolutely must use JavaScript, consider using software that can help you manage the risk. NoScript, for example, is available for Firefox users.