On StackOverflow a user asked: How can I create an object of a class which defined in the remote page?
The page includes code like this (which I entered into Firebug):
function foo(){ this.bar = 0; }
Then I verified that it could be read from Greasemonkey with the GreasyThug console by the following expression:
_foo = unsafeWindow.foo; x = new _foo();

This caused a “Not enough arguments” error, whatever the hell that is. Not quite the poster’s actual error. What if we added an argument? “Illegal Value” Bingo! Replicated the issue. Now to solve it.
Let’s try and migrate the function over into the Greasemonkey script zone.
_foo = eval('(' + unsafeWindow.foo.toSource() + ')') => function foo(){ this.bar = 0; }
That’s the ticket! Now to instantiate and verify:

Ship it! Holla!