I just turned off JS entirely.
Use NoScript if you absolutely require JS to use certain sites, otherwise just disable it (JS specificly, any scripting in general) to avoid the hassles in the first place.
Good luck running your crappy code on my machine when I've configured it not to allow any scripting at all!