To keep the global namespace clean, my JavaScript code is wrapped like this:
(function() { /* my code */ })();
Now I have some variable
evil solution/hack: Put the variable you need in a helper object obj and avoid having to change current uses to dot notation by using use with(obj){ your current code... }