Is it possible to do the following in some other way, without passing parameters?
var f = function(){
console.log(v);
}
var original = f;
f = function(){
var v = "test";
original();
};
// the following line is called by 3rd party code
f(); // it errors out here - v is not defined
va global variable.